Redirection All AMP URL to Main Post URL

Many WordPress users install amp on their site by following various online tutorials. But while deleting an amp, not all users do it properly. Why am I saying this?

You know once you activate amp on the site, all the post and page links are changed. And all those new links are also indexed in the Google search engine.

These links will remain valid as long as the amp plugin is installed on the site. If you deactivate or delete the plugin, all links will get a 404 error.

So the amount of traffic those posts were bringing, that traffic will become 0. This requires redirecting all amp URLs to the main post URL.

And if you do this, your site will not lose any ranking or SEO. Because the post can be accessed from the search engine according to the visitor’s demand.

How to Redirect all AMP URLs to Main Post URLs?

There are two methods to redirect all AMP URLs to the main post URL. One is with the Rankmath plugin and two is by editing the .htaccess file, use the method you need.

But I would recommend using the second method. Because as long as the Rankmath plugin exists, the redirection will work. When you delete the Rankmath plugin, this redirection will no longer occur.

1. AMP Redirection Using Rankmath Plugin

  • Login to your WordPress admin panel,
  • Click on the Redirection option under the Rankmath section,
  • Past my source code in the source field,
  • Choose the Regex option from the drop-down section,
  • Past my destination code in the destination field and edit the code with your URL.
  • Make sure to select Activate button,
  • Finally, click on the Add New Redirection button,
  • Now check your AMP link in the search engine,

2. AMP Redirection Using .htacces File

  • Log in your cPanel or hPanel,
  • Go to file manager,
  • Find out .htacces File, If the file is not found, then dot-file is hidden. Check file manager settings.
  • Paste my .htaccess code at the end of all the code.
  • Save changes,
  • Now check the AMP URL.

P. Mahata (West Bengal)

You can solve many of your problems through this site. Especially WordPress, Blogger, YouTube, Coding, Website Design, Solutions, etc.