How to Validate Magento 2 AMP Pages

In this article, you will learn how to test and validate your Magento 2 AMP pages, as well as make sure these AMP pages have been indexed by Google. Valid AMP pages are indexed and stored in Google Cache, which means that pages load in less than 1 second from mobile Google search results. Please follow the steps below to validate AMP pages.

Google Chrome Extension (Recommended)

We recommend using Chrome extension for validating your AMP pages, as it is the easiest and fastest way. It helps quickly find the AMP version of the page and check if it is valid.

First, search for the AMP Validator Chrome extension in Chrome Web Store and install it.

Step-by-step guide:

  1. Go to your website Homepage and swith to AMP mode by clicking the blue icon of the AMP Validator extension.
  2. Browse your website in AMP mode and see whether the page is valid or not. If the page is not valid, the extension icon turns red, otherwise, it remains green.
4 amp testing magento 2 validate.jpg

Important Information:

Sometimes, the AMP Validator extension cannot access your website – it can be blocked by CDN or HTTP authentication. In this case, you should use validators and manually provide the HTML content of your AMP pages. Check how to use these validators in the next sections.

Online Validator #1

In order to validate your AMP pages at the AMP validator made by Google search.google.com/search-console/amp, follow the instructions below.

The striking feature of this validator is that it highlights all the parts of the code that cause errors.

Step-by-step guide:

  1. Enter your AMP page URL you want to validate (including AMP page identifier).
  2. This block shows whether your AMP page is valid.
  3. This block displays the description of your AMP page data.
2 amp testing magento 2 validate.jpg

Online Validator #2

In order to validate your AMP pages with the Official AMP Validator validator.ampproject.org, follow the instructions below.

Step-by-step guide:

  1. Enter your AMP page URL you want to validate (including AMP page identifier). Check the validation status: it can be “PASS” or “FAIL”.
3 amp testing magento 2 validate.jpg

Developer Tool AMP Validator

In order to validate your AMP pages using the Developer Tools in your browser (hotkey F12), follow the instructions below.

Step-by-step guide:

  1. Enter your AMP page URL you want to validate (including AMP page identifier).
  2. Add hash parameter #development=1 to the URL.
  3. Press F12 hotkey and go to the Console tab.
  4. Reload your pages (hotkey F5) and check the results.
5 amp testing magento 2 validate.jpg

Important Information:

If the validation failed using any of the methods above, try fixing the issues using our Troubleshooting AMP articles. Otherwise, check the AMP documentation and Guidelines or contact our tech support.

Additionally, learn how to keep Magento AMP pages valid with Google Search Console.

Was this article helpful?