How can you fix the 404 / page not found errors when you deactivate the AMP plugin.
Step 1: Download the free plugin called Redirection By John Godley
Step 2: After Activating go to WordPress Dashboard -> Tools -> Redirection and Setup new redirection.
To setup new redirection, we need to setup 2 things Source URL and Target URL
So in the source URL paste this regex code. /(.*)\/amp
This code will make sure all your post URL ending with /AMP are taken as Source URL and will be redirected.
In the target, URL paste this https://www.yourdomain.com/$1
and make sure you enable the checkbox “Regular Expression”.
Your redirection should look like this.
Step 3: Hit Add Redirection and test it.
I suggest you to please check multiple amp pages and make sure they are working as expected.
I hope this will help you handling 404 pages generated after deactivating the AMP plugin, and I’m sure after some time Google will update its data in search console and /amp pages will be deindexed slowly.
That’s it for this tutorial!
We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.
The input form Redirection URL now different
What does this mean?
To prevent a greedy regular expression you can use ^ to anchor it to the start of the URL. For example: ^/(.*)\/amp
Hi Erdiawan,
Could you let us know where exactly you found this “the input form Redirection URL now different” message?
What option to select in the ‘query parameters’ while adding a new redirection?
Hi Hina Gujral,
No need to add anything in the query parameter once you select the “Regex” option “query parameters” option automatically will disappear
Nice. It works well.
Thank you sir
But it didn’t work for me.
I still get the 404 error
Hi Shahab,
Will you please contact our technical team from here- https://ampforwp.com/support/ they will help you as soon as possible.
Hi,
Thanks for this, it worked as far as redirecting the amp urls but the browser then throws a warning the page is no longer secure after the redirect. Any suggestions?
HI Bob,
Will you please provide us exact URL where you are having an error so that we can check and get back to you.
This did the trick easily! Thank you so much!
Hi,
I hope you can help me. I made the mistake of installing the AMP plugin. I uninstalled it and my site is okay IF you type in the url. However, if you search for ragamuffin kittens, the Home page ragamuffinkittens.org is an AMP page with a 404 error. Can you please, please help me? This club had a really good ranking before this. Thank you.
Kathy
Hi Kathy,
Will you please contact our technical team from here- https://ampforwp.com/support/ they will help you as soon as possible.
Hello,
I want to stop amp on my site “https://www.relaxdermo.fr”.
I deleted the ampforwp plugin and reconfigured the structured data but on mobile I am directed to the page “non amp view” of the ampforwp plugin which is empty.
Even with a redirect it doesn’t work.
If you could inform me.
thank you in advance
Hi SALMON MAILLARD Marie-Martine,
Will you please contact our technical team from here- https://ampforwp.com/support/ they will help you as soon as possible.
Hello,
I have page which have /?amp AMP format. So this regex code /(.*)\/amp is not working for me.
Any solution for /?amp AMP format?
Thank you!
Hi Karim,
Will you please contact our technical team from here- https://ampforwp.com/support/ they will help you as soon as possible.