Testing AMP Magento Extension
In this article you will learn how to test and validate your Magento Accelerated Mobile Pages, as well as ensure these AMP pages were indexed by the Google to make your website appear in the top of the Google Search Results. Please follow the steps below.
Test your website URLs with GET parameter “?amp=1” (by adding it to the end of the URL). Important: Make sure to test the following pages, as the AMP technology does not work with the pages like Account, Checkout, Shopping Cart, etc. Instead, it works only with:
- Home Page
- Product List Page
- Product Page
- CMS pages
Validating AMP pages
Next step is to make sure your Magento AMP pages contain no errors in the code. This way, if the validation is passed – your pages will be indexed by the Google properly. There are 4 ways to validate your AMP pages.
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 haven’t been validated.
- Enter your website URL with GET parameter “?amp=1” into this field and run the validation.
- This block shows whether your AMP page is valid.
- This block displays the description of your AMP page data.
Online Validator #2
In order to validate your AMP pages with the Official AMP Validator validator.ampproject.org, follow the instructions below.
- Enter your website URL with GET parameter into this field and run the validation.
- Check the validation status: it can be “PASS” or “FAIL”.
AMP Validator Google Chrome Extension
In order to validate your AMP pages using AMP Validator Chrome extension, please install the extension and follow the instructions below.
- If AMP Validator Chrome extension is active – this means AMP technology is active and working on your AMP page.
Developer Tool AMP Validator
In order to validate your AMP pages using the Developer tools in your browser (hotkey F12), follow the instructions below.
- Enter your website URL with GET and hash parameter “?amp=1#development=1” in your browser.
- Press “F12” hotkey and go to “Console” tab.
- Reload your pages (F5) and check the results.
Reviewing AMP pages in Google Webmaster Tools
Once your website AMP pages are indexed – after a couple of days your pages will be cached and stored in the Google CDN (Content Delivery Network). In order to see if the AMP pages are indexed properly, perform the following steps.
- Go to Google Search Console.
- Select “Search Appearance” tab.
- Go to “Accelerated Mobile Pages” tab.
- This field allows you to check status of the AMP pages that have been indexed by Google.
Testing AMP Pages in Google AMP CDN
After some time (usually within a week), your AMP pages will be cached in Google AMP CDN (Content Delivery Network). In order to check if your AMP pages are cached – please follow these steps.
- Access your AMP pages in Google AMP CDN via this URL:
WHERE “<origin-domain>/<path>?amp=1” corresponds to your AMP page e.g. “demo.plumrocket.net/amp/?amp=1”
The final url to the page within the CDN in this case will be formed as this example:
2. In case your AMP pages are protected with secure “HTTPS” protocol – then you should add an extra “s/” value to the URL. In this case, the URL will be formed as:
- This is how the URL from the Google AMP CDN containing your website page should look like after it has been cached.
Re-crawling your URLs manually
Usually, Google will index your AMP pages within a couple of days (if all the AMP pages have passed the validation of course). In case you don’t have time to wait – you might want to consider using the Googles “Fetch as Google” option to request Google bots to re-crawl your website. Please follow the steps below to re-index the Magento AMP pages manually. Note: Additionally, in order to be extra sure the Google robots will be re-indexing your AMP pages – please add the GET parameter ?amp=1 to the end of the URL field below. Remember, it is still recommended to wait until Google robots index your website on a scheduled basis, as the number of manual re-index attempts for your Google account is limited.
- Go to Google Search Console.
- Select “Crawl” tab.
- Go to “Fetch as Google” section.
- Select “Mobile:Smartphone” option in this field.
- Leave this field blank to fetch the homepage or enter any other subpaths.
- Press “Fetch” button.
- Press “Submit to index” button to proceed.
- Usually, you would want to select the “Crawl this URL and its direct links” option, as it will crawl not only the needed page, but all the subordinate pages too.
- Press “Go” for the recrawling process to start. Note: even in this case it might take Google crawlers some time to crawl you pages.
- After you submit URL to index – you will see “URL and linked pages submitted to index” success message. This means that the Google robots will re-index your website pages soon.
Troubleshooting AMP Magento Extension
Here you will find answers to known issues that may occur while validating AMP Magento Extension pages.
Please check the Next Step > Troubleshooting AMP Extension.