Disable AMP and send desktop to everyone

AMP is causing too many performance issues on my host, so they asked me to consider disabling it. I haven’t been able to find a way to redirect all AMP pages to the desktop version on Cloudflare. How do I do that?

Also - if the redirect is done at Cloudflare, am I correct that there’s no need to out in any redirection capability on the host?


I would create a page rule with a wildcard (*) and $1



Honestly if a plugin is causing performance issues it’s might be poorly written and if you let them know about an issue they may be able to fix it and if it’s causing issues for the host I would migrate to better hosting provider.

1 Like

Due to my curiosity, may I ask which performance issues on the host exactly? :thinking:

Are you talking about the “AMP Real URL” feature at Cloudflare dashboard, or rather your AMP HTML pages?

Maybe you have got some Mobile Redirect configured? :thinking:

Otherwise, are you using some plugin for WordPress? :thinking:
If so, then it’s the plugin issue, not Cloudflare, at least not if you’ve got the “AMP Real URL” enabled, therefore other settings are configured by the plugin, if so.

I am using AMP for years already, no issues.

Double-check for amphtml <link> in your HTML code and remove them, obviously, therefore stop indexing amp pages as well via your sitemap & Google Search Console.

1 Like

The optimizations are disabled.

The issue get rather complicated because of transients created by some of the plugins I use. The options file grows to 60 MB overnight. I don’t want to get rid of the features they provide. And it’s only a problem with AMP pages. Desktop only it’s quite fast.

That’s interesting.

A lot of plugins shouldn’t even run on the AMP URLs at all, like some plugins for comments, link sharing, etc. because they would break the validation of the AMP pages as well (injected frames, JavaScript code, etc.).

By the definition, Google AMP should be even faster :sweat_smile:

I’ve been trying to do that, but so far keep getting filter parsing error with https://mydomain.com/$1/ on redirect rule with uri query string containing AMP. Or other variation like “equals AMP”, including or leaving out https://, the domain and just using /$1/, Etc.
Anyone done this and knows the correct format for the expression?

Got it - had trailing slash where it shouldn’t be.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.