X hide

Magento 2 Accelerated Mobile Pages v2.x Troubleshooting

From Plumrocket Documentation




AMP iframe doesn't load on AMP product pages

In case the alias of your domain name is not setup with "www" - AMP Iframe will not load on your AMP pages.

1.The following error displays when AMP iframe doesn't load on AMP product pages.

Magento amp iframe not loading.jpg


You need to configure the alias of your domain name with "www" - in this way the iframe will be loading properly.


Incorrect "script" tags placement

In some cases AMP is not valid because the script tags are in the "body" part of the HTML page.
This can be caused by the third-party extension that moves "script" tags from "head" to the end of "body" part of the HTML page.


You need to set the third-party extension in the specific way, so it will not be running on AMP pages. These configurations can be performed in the extension's settings or you can make minor code modifications.
For this purpose contact your third-party extension developers or our support service.


AMP Pages validation fail due to custom changes in "robots.txt" file

In some cases your AMP pages will not be validated - it can be due to custom changes in "robots.txt" file.

1.Enter your website URL with GET parameter "?amp=1" into this field and run the validation.
2.If you receive the following error, this means that an access for Google crawlers is restricted in the "robots.txt" file on the server.

Amp search unavailable robots.jpg


Remove the restrictions for Google crawlers on your server in order your AMP pages to be parsed.


Google Search Console does not display AMP pages indexed

If you see this notice: "We did not find any Accelerated Mobile Pages in your site" and Magento AMP extension was installed more than 1-2 weeks ago, you might have set some rules in the ".htacess" or "robots.txt" files on your server that do not permit indexing by Google crawlers.

Search-console-amp troubleshooting.jpg


In this case you need you to make the following steps:
1. Check the rules set in the ".htacess" or "robots.txt" files to make sure that indexing is permitted.
2. Go to Google Search Console > Crawl > Fetch as Google, and check in the "Status" column. The pages indexed should be marked with green checkmark and status "Complete". If you see any other statuses in the list - please inspect the status report by clicking on the page with issue.

Information Sign sm.png Example:
  1. Here are the pages with "Not found" status.

Amp troubleshooting google-search console.jpg