{"id":391,"date":"2017-06-15T22:00:52","date_gmt":"2017-06-15T22:00:52","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?p=391"},"modified":"2019-07-23T11:58:47","modified_gmt":"2019-07-23T11:58:47","slug":"fix-404-on-amp","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/fix-404-on-amp\/","title":{"rendered":"How to Fix 404 on AMP pages after deactivating the AMP plugin"},"content":{"rendered":"<p>How can you fix the 404 \/ page not found errors when you deactivate the AMP plugin.<\/p>\n<p><strong>Step 1:<\/strong> Download the free plugin called\u00a0<a href=\"https:\/\/wordpress.org\/plugins\/redirection\/\">Redirection<\/a> By John Godley<\/p>\n<p><strong>Step 2:<\/strong> After Activating go to <strong>WordPress Dashboard <\/strong>-&gt; <strong>Tools <\/strong>-&gt; <strong>Redirection<\/strong> and Setup new redirection.<\/p>\n<p>To setup new redirection, we need to setup 2 things Source URL and Target URL<br \/>\nSo in the source URL paste this regex code. \u00a0<code>\/(.*)\\\/amp <\/code><br \/>\nThis code will make sure all your post URL ending with \/AMP are taken as Source URL and will be redirected.<\/p>\n<p>In the target, URL paste this <code>https:\/\/www.yourdomain.com\/$1<\/code> and make sure you enable the checkbox &#8220;Regular Expression&#8221;.<\/p>\n<p>Your redirection should look like this.<\/p>\n<p><a href=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-11114\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21.png\" alt=\"\" width=\"1319\" height=\"492\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21.png 1319w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21-300x112.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21-768x286.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21-1024x382.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21-50x19.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21-60x22.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2017\/06\/Redirection-\u2039-wordpress-\u2014-WordPress-Google-Chrome-2019-06-17-11.56.21-100x37.png 100w\" sizes=\"(max-width: 1319px) 100vw, 1319px\" \/><\/a><\/p>\n<p><strong>Step 3:<\/strong> Hit Add Redirection and test it.<br \/>\nI suggest you to please check multiple amp pages and make sure they are working as expected.<\/p>\n<p>I hope this will help you handling 404 pages generated after deactivating the AMP plugin, and I&#8217;m sure after some time Google will update its data in search console and \/amp pages will be deindexed slowly.<\/p>\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n<p>We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.<\/p>\n<div id=\"div-1\" class=\"hkb-feedback\">\n\t\t\t<strong class=\"ht-mobile-exit__title\">Ask your Questions Directly!<\/strong><br>\n\t\t\t<div class=\"hkb_widget_exit__content\" style=\"font-size: 14px;\">If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!<\/div>\n\t\t\t<a href=\"https:\/\/ampforwp.com\/support\/#contact\" id=\"button\" target=\"_blank\" rel=\"noopener noreferrer\"><button>Yes, I have a Question<\/button><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>How can you fix the 404 \/ page not found errors when you deactivate the AMP plugin. Step 1: Download the free plugin called\u00a0Redirection By John Godley Step 2: After Activating go to WordPress Dashboard -&gt; Tools -&gt; Redirection and Setup new redirection. To setup new redirection, we need to&#8230;<\/p>\n","protected":false},"author":3,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":[],"ht-kb-category":[5],"ht-kb-tag":[],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/391"}],"collection":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=391"}],"version-history":[{"count":9,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/391\/revisions"}],"predecessor-version":[{"id":12990,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/391\/revisions\/12990"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=391"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=391"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}