rel=”canonical” producing Twice

  • Hello Rankmath rel=”canonical” is producing twice, how can i solve this issue?
    source code screenshot attached Canonical twice in amp

    Because of this i get amp error in search console as follows
    search console amp issue

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

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    This error might suggest that you have not yet enabled Rank Math as your SEO plugin of choice on your AMP settings so that it can take over the creation of the meta tags on the AMP pages.

    Please check if this is the case and configure this option.

    Looking forward to helping you. Thank you.


    This error occurs only after activation of amp in RankMath, the other conical Amp is produced by theme AMP plugin, but there is no option to turn of amp conical in theme AMP plugin,
    So, I turned off AMP module of RankMath and it’s working fine with no error,

    But I want RankMath Amp to be activated, this will happen if conical Amp is stopped from any of the plugins ( theme AMP or RankMath Amp)

    Can we only turn off RankMath Amp Conical keeping other RankMath Amp Functional?


    Which AMP plugin are you using? There are a lot of AMP plugins that support Rank Math or at least allow to disable features (like the canonical one).

    Looking forward to help you.

    I’m using “Soledad – Multi-Concept Blog Magazine WordPress Theme”

    This Theme has their own plugin addon which supports amp version, their is no option in it to turn off conical address,

    So, how can I use RankMath Amp module and only turning off conical address production?


    Thank you for contacting Rank Math today.

    Yes you can create a conditional to check if the page is an AMP page and then disable the Rank Math canonical like so:

     * Allow changing of the canonical URL.
     * @param string $canonical The canonical URL.
    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
        // Create suitable conditional for your amp plugin, this is an example
           return false;
    	return $canonical;

    Looking forward to helping you. Thank you.



    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘rel=”canonical” producing Twice’ is closed to new replies.