custom canonical url in the “advanced” RankMath tab not working

#240693
  • Resolved Urgence Sport Paris
    Rank Math free

    Hello,

    When I enter a custom canonical url in the “advanced” RankMath tab, the “<link rel=”canonical”…” in the page source code remains unchanged.

    When the AMP plugin is desactivated, the <link rel=”canonical” in the head disappears, but RankMath custom url does not show.

    I have succesfully managed to put a temporary piece of php code to display my custom <link rel=”canonical” in the head and it seems to supersede the AMP plugin link. But RankMath custom url does not show either.

    Settings :

    WordPress 5.8
    AMP plugin by AMP Project Contributors Version 2.1.3
    AMP settings : standard mode
    Theme : GeneratePress + child

    Explanation : I have two versions of the website, with 100% independent WordPress installations since it was impossible to get AMP plugin to work with the Divi theme and some necessary plugins (not an ideal solution, but it’s was the only way to pass the AMP validator).

    1 / normal website built with DIVI and lots of javascript-dependent functionalities
    https://www.my-website.com/

    2 / AMP website built with an amp-compatible theme (GeneratePress) with minimal use of basic plugins.
    https://www.my-website.com/amp/

    normal website 1 will have <link rel=”amphtml” href=”https://www.my-website.com/amp/&#8221; (currently desactivated while amp website in in construction)

    AMP website 2 should have <link rel=”canonical” href=”https://www.my-website.com/&#8221; same as website 1 url
    currently displays the “self canonical” link for a standard setup https://www.my-website.com/amp/

    My guess it that for some reason RankMath custom canonical is not fired when the AMP plugin is in standard mode.

    Could you investigate the issue and possibly suggest a workaround ?

    Thank you.

    Michael

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you so much for getting in touch.

    You are not seeing the canonical tag because your pages (on /amp/ site) are set to be noindex. On your noindex tags, we do not add the canonical URL because it is not required or needed on them.

    Are you setting them to be noindex on purpose? Have you tried removing the noindex tags?

    You can do that by disabling this option:

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Thank you very much for this fast answer.

    The website is currently under construction and thus set to noindex.

    I disabled the noindex for a few seconds and RankMath does display the custom canonical url correctly.

    I never would have thought of that …

    Thanks again !

    Michael

    Hello,

    We are glad that we could address your concern. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this ticket.