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?
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.
Otherwise, are you using some plugin for WordPress?
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.
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.
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
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?