Greetings, ladies and gentlemen! If you have deleted the plugin for generating AMP pages, you may find that pages with the AMP prefix still exist, including in the search engine index. This prefix can look different, for example:

?amp
/amp/

There are other options as well. Even after deleting the AMP plugin, AMP pages will still be present in the Google or Yandex index for some time. In this article, I will tell you how to completely get rid of AMP pages in WordPress.

Step-by-Step Instructions for Removing AMP Pages from WordPress and Search Engine Indexes

After removing AMP, these pages will still be available in the Google search engine index for some time. Links will lead to AMP pages, and an error will appear in Yandex Webmaster:

Example of error due to AMP-pages in Yandex Webmaster

This problem most often occurs when you use AMP with a GET parameter address:

?amp

This can cause a number of problems, as these pages will be considered duplicates.

Pages with GET request ?AMP - duplicates

In fact, you can add almost any GET parameter to the address on WordPress websites, but the target page will still be displayed.

An example of a query string on a WordPress website page
As you can see, I just typed a random query string, but the page still displays

So, you can easily create a lot of duplicate pages. This is especially noticeable in the case of AMP when “Crawling by counters” is enabled in Yandex Webmaster. People come from Google to non-existent AMP pages with a GET parameter, the target page is displayed without changes, and Yandex considers this page a duplicate.

The first thing to do in such a case is to prevent the crawling of such pages through the robots.txt file. It should be located in the root of the website, and if such a file doesn’t exist, it needs to be created.

In the file, directives should be specified. If you are using the query string form like ?amp, you need to inform search engines that these pages should no longer be indexed.

For example, for Yandex:

User-agent: Yandex
Clean-param: amp

For Google:

User-agent: Googlebot
disallow: /*?*amp

If the address is in the /amp/ format, the directives would be as follows:

User-agent: Yandex
disallow: /amp/

User-agent: Googlebot
disallow: /amp/

Alternatively, you can block all robots at once:

User-agent: *
disallow: /amp/
disallow: /*?*amp

Now, AMP pages are prohibited from being indexed by search engines. However, this doesn’t guarantee that they won’t end up in the search engine index, so it’s advisable to set up redirection. To achieve this, you can use a universal directive that will remove all types of AMP page addresses. Add it to the .htaccess file, which should be located in the root folder of your website.

The directive is added before the line # BEGIN WordPress:

RewriteCond %{QUERY_STRING} ^(.*&)?(?:no)?amp(?:=[^&]*)?&?(.*)$ [OR]
RewriteCond %{REQUEST_URI} /amp/?$
RewriteRule ^/?(.*?)(/amp/?)?$ /$1?%1%2 [NE,R=301,L]

This directive adds a 301 redirect (Moved Permanently) to AMP pages, and after some time, they will simply disappear from the search results.

As you can see, removing AMP pages completely, including from search results, is quite straightforward.

I hope this guide helps you, and I wish you success and all the best!

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

If the materials from this website have been helpful, and you wish to support the blog, you can use the form at the following link: Donate to support the blog