DISABLE AMP and redirecting to non-amp not working

  • I am using Better AMP Plugin for AMP and Rank Math plugin for SEO. Now, I want to disable AMP version of the website, and redirecting AMP traffic to normal responsive website. For this purpose, I have tried Redirection in Rank Math, and used,

    Type Regex
    Source: (.*)/amp
    Destination: $1

    But, unfortunately, this so doesn’t redirect http://www.example.com/amp/123 to http://www.example.com/123 URLs in my website.

    After this was not working, I have tried to put following code in .htaccess

    // Redirect AMP to non-AMP 
    RewriteEngine On
    RewriteCond %{REQUEST_URI} (.+)/amp(.*)$
    RewriteRule ^ %1/ [R=301,L]

    But, unfortunately, this also doesn’t work. I have also tried to install Redirection plugin, which is not working along with Rank Math.

    Please help me in this case and resolve my issue to disable AMP completely without 404 Errors. Waiting for your reply.

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

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

    Could you please create a new Regex redirection and then add the following code to the source field:
    and then set the following on the destination:

    Let me know how this goes.

    Looking forward to helping you. Thank you.


    Thanks. This is working 🙂
    AMP pages are redirecting to canonical versions successfully.
    Now, if I want to redirect a AMP URL to new AMP URL, how can I do that?
    For example, old url is: http://www.example.com/amp/abcdef, and I want that new URL should be http://www.example.com/abcdef/amp/
    So, how to redirect to new AMP URL. Reason is because Better AMP and AMP for WP plugins have different AMP Url structures.
    Please guide me how to redirect to new AMP URL from old AMP URL.

    I have a problem with my blog, I have some adress which aren’t amp adress and I also have a problem with rel=canonical. Could you help me please, nothing work on my amp page, no more menu.

    Hello @ramandeepsingh

    Thanks for getting back to us.

    I don’t think that you need an extra redirection since the regex redirection is removing the /amp base on the URL and redirecting to the parent post.
    The new AMP plugin will append the URL to the canonical and thus there should not be any 404 errors on your site.

    could you please share a link to the affected posts so that we can check this further?

    We are 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 4 replies - 1 through 4 (of 4 total)

The ticket ‘DISABLE AMP and redirecting to non-amp not working’ is closed to new replies.