• Resolved Nelinfo

    (@nelinfo)


    Hi, Milind!

    Testing your plugin. It greatly speeds up the site!

    However, there are serious problems. Google and Yandex threw out the canonical pages of my site from the index (despite the fact that each page had a canonical address). For example, Google says that the mobile version has the tag “canonical” and this is a mistake. I looked at the source code for both the mobile and desktop versions of the site. They really have a single canonical address.

    Does your plugin have functionality that allows you to set the page address with rel=”alternate” attributes for the mobile version of the site? Or another solution? Thank you. Denis

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Nelinfo

    (@nelinfo)

    Dev also recommends using rel=alternate Links: here and here.

    Plugin Support Milind More

    (@milindmore22)

    Hello @nelinfo

    Google says that the mobile version has the tag “canonical” and this is a mistake. I looked at the source code for both the mobile and desktop versions of the site. They really have a single canonical address.

    The non-AMP page (Desktop version) of the site will have <link rel="amphtml"> tag with AMP page URL, since you have added an alternate tag for same URL it’s throwing errors.

    Please note that the Mobile version of your Page could be different from AMP page
    eg: your Mobile version Link (open in mobile device)

    Similarly, the AMP page will have a canonical link <link rel="canonical"> indicating this is the AMP version of the page and the actual version of the AMP page is different.

    you can add the following to your non-AMP page

    <link rel="alternate" type="text/html" media="only screen and (max-width: 640px)" href="https://nelelektro.com/catalog/%D0%BF%D0%BC%D0%B0-4100-110%D0%B2/?noamp=mobile">

    Let us know if that resolves your issue

    Please make sure to add ?noamp=mobile

    Thread Starter Nelinfo

    (@nelinfo)

    Hi, Milind!

    You apparently didn’t read the second part of my question very carefully. And I was offered to implement my own idea. )) And what Dev recommends I have read several times.

    The question was: Does your plugin have functionality that allows you to set the page address with rel=”alternate” attributes for the mobile version of the site?

    I know to add rel=”alternate”. However, I don’t know how to implement this on all the canonical pages of my site. That’s why I turned to you for help.

    Do you have a step by step guide to solve the problem? It would also be better if this functionality was in your wonderful plugin.

    Thank you. Denis

    Thread Starter Nelinfo

    (@nelinfo)

    I suppose a filter is needed that adds the rel=”alternate” attribute to the code of each canonical page. Maybe I’m wrong.

    Plugin Support Milind More

    (@milindmore22)

    Hello @nelinfo

    Sorry, I forgot to add the solution details, As you are using Reader mode with Legacy theme.

    You can use the amp_post_template_head action hook which is equivalent to wp_head you can add the <link rel="alternate"> tag with it.

    You can find more details about customizing the AMP Legacy Theme in documentation

    We hope this is helpful!

    • This reply was modified 1 year, 2 months ago by Milind More.
    • This reply was modified 1 year, 2 months ago by Milind More.
    Plugin Support Milind More

    (@milindmore22)

    Hello @nelinfo As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Rel=”alternate” for the mobile’ is closed to new replies.