referenced amp url is self-canonical amp

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

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

    Can you confirm that the Rank Math Amp module is enabled on your site via Rank Math > Dashboard?

    Looking forward to helping you. Thank you.


    yes the AMP module is enabled. My theme already has an AMP module, so I don’t need the additional plugin to get AMP.


    Apologies for the delay.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    We really look forward to helping you.


    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    I added the information.


    Thank you for contacting Rank Math today.

    I have raised this problem with our dev team and we will be getting back to you in a short while.

    Looking forward to helping you. Thank you.


    Kindly rectify this problem asap.


    This is a known issue and we are going to get in touch with the Better AMP team to address this issue. For now, to fix the issue on your site, I added below filter code in your theme’s functions.php file:

    add_action( 'rank_math/frontend/canonical', function( $url ) {
    	if ( ! is_singular() || ! function_exists( 'better_amp_rel_canonical_url' ) ) {
    		return $url;
    	$custom_url = RankMath\Post::get_meta( 'canonical_url', get_the_ID() );
    	if ( $custom_url ) {
    		return $custom_url;
    	return better_amp_rel_canonical_url();

    This seemed to have fixed the issue. Can you please confirm?

    Thank you.

    I run the validation fix but getting this error


    The error you see in the AMP validation is not caused due to the Rank Math plugin. There are some HTML markup validation issues. Please contact your theme developer or Better AMP plugin developer, they could assist you better.

    I hope that helps. Thank you.

    Let me check with other theme.

    Hi Chandra,

    If you need help with anything else, please open a new support ticket here so we can help.

    We are always here for assistance.

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

The ticket ‘referenced amp url is self-canonical amp’ is closed to new replies.