How to Test Your AMP Pages: Complete Guide

Learn how to implement, validate, monitor, and fix the most common AMP errors to enhance SEO with this step-by-step testing guide. AMP is all about the user experience and fast loading of pages. This is done by limiting CSS to 75KB and JavaScript to 150KB, clearing the critical rendering path, and preloading cached content. Even so, AMP isn't for everybody. 

In fact, its restrictive framework and constantly evolving standards (among other quirks and limitations) have made AMP somewhat controversial in SEO circles. If you are doing plan to use AMP, testing is crucial so as to urge your pages indexed by Google and luxuriate in the improved page experience this format can provide. 


How to Test Your AMP Pages: Fully Guide

What Are the wants for Valid AMP? 

In order to be considered valid, AMP documents must: 
Start with the doctype <!docotype html>.
  • Contain a top-level <html> tag (<html amp> is accepted as well). 
  • Contain <head> and <body> tags. 
  • Contain a <link rel=”canonical”> tag inside their head that points to the regular HTML version of the AMP HTML document or to itself if no such HTML version exists. 
  • Contain a <meta charset=”utf-8″> tag because the first child of their head tag. 
  • Contain a <meta name=”viewport” content=”width=device-width”> tag inside their head tag. 
  • Contain the AMP boilerplate code (head > style[amp-boilerplate] and noscript > style[amp-boilerplate])  in their head tag. 
If any of those mandatory elements are missing or misconfigured, the AMP HTML is going to be considered invalid, and should not show up in mobile search results

3 Steps for Testing AMP 

There are three stages to testing AMP: 
  • AMP Implementation Testing. 
  • AMP Validation. 
  • AMP Performance Monitoring. 

How to Test That AMP Has Been Implemented Correctly 

Only valid AMP URLs are eligible to be displayed within the search results. Therefore, it's recommended that an internet site test its AMP implementation before releasing it live. 

Generally, developers will password-protect their test and staging environments. this is often considered best practice to stop Google from indexing these. 

That’s why at this stage, the AMP Validator is your fastest option for testing. 

With the assistance of this free tool, you'll directly paste your ASCII text file and check for any possible errors. 

This tool will allow you to know the validation status by displaying PASS or FAIL. 

validation status

Another quick way of testing AMP is by downloading the AMP Validator browser extension for Chrome. 

This plugin will automatically check each page for AMP validation. 

It will convert in green if the page passes AMP validation or convert in red if the page fails.

plugin to check each page for AMP validation

And just in case you wanted to triple-check, you'll also use Chrome developer tools. 

Simply append “#development=1” to the URL and use the Chrome DevTools console to verify there are not any issues found. 

Chrome DevTools console

Note: As explained in Google’s debug guide, it's also possible to check AMP on locally hosted or firewalled pages using Ngrok by following this guide. 

How to make sure the Discoverability and Crawlability of AMP 

Outside of getting a valid AMP code, it's important to make sure that these pages are often discovered by search engines. 

Google discovers AMP by crawling the canonical URL. Therefore, there's no got to have a separate XML sitemap for your AMP URLs, unless your website is a canonical AMP. 

As shown below, the canonical URL should have the subsequent “amphtml” link tag. 

The AMP page should reference the first with the “canonical” tag. 

amp-indexing-discovery

A simple, no-tool-required way of testing this is often to go to the canonical URL in your browser view source and look for “amphtml”. 

For example, for this programming article on how Google ranks news sources, we might inspect the HTML page source: 

amp html view source

Then, by clicking that link, we will inspect the HTML page source and verify that we will find a link tag to the canonical: 

canonical view source amp

You may wish to automate this process by employing a crawler that automatically extracts the < link rel = “amphtml” > from the HTML ASCII text file of all crawled pages. 

For more information on how AMP indexing works, inspect the really helpful FAQ Google has put together on AMP indexing

How to Test AMP Validation 

Once AMP has been implemented, it's important to try to do a standing check once in a while to make sure your pages remain error-free. 

The quickest method to verify that an AMP URL is valid is to use Google’s AMP test. 

It is also possible to bulk-check AMP validation free of charge on 100 URLs using this tool. 

Or, you'll even use this free Google Sheet AMP validation tool to run daily, weekly, or monthly spot checks. you'll set it up to stay track of thousands of AMP URLs automatically. 

However, if you're looking to run AMP validation on a vast URL set, it's probably best to take a position during a paid solution like Screaming Frog, Sitebulb, DeepCrawl, or Botify. When found out correctly, each of those will validate AMP at scale. 

For more information on the way to scale AMP validation using these tools, Screaming Frog features a great step-by-step guide. Sitebulb has also put together a very helpful checklist of AMP issues to seem out for when auditing AMP. 

How to Monitor AMP Performance 

The best place to watch AMP performance is Google Search Console. 

Using GSC to watch AMP is particularly helpful for understanding the search performance of AMP and any issues Googlebot may have had when crawling your pages. 

There are two ways to access the data: 
  • For search results performance: Check the performance report within the Search Console and apply a filter for the AMP search appearance. 
  • For error checking: Search Console > Enhancements > AMP. 
The AMP status report is especially useful because it shows all AMP pages with issues found by Google, grouped by issue type. 

Simply click a selected issue to ascertain the small print, including a sample list of pages affected. 

Note: Google only provides a sample list of 1000 URLs experiencing that issue. However, it generally tries to supply information supported by similar URLs. Typically, sites have templates for various page types. 

Once you’ve identified which URLs are having the problems, the subsequent step is to repair them. \

How to Fix Common AMP Errors 

Here are the foremost common AMP errors and the way to repair them. 

1. Content Mismatch Error 

One of the foremost common AMP errors may be a content mismatch. 

This error was so common that in 2017, two years after AMP launched, Google announced the AMP content parity update. This was Google’s retaliation to the AMP bait and switch and required that the AMP page content is like the (original) canonical page content. 

It is fine if the AMP version has more ads than the HTML page. But generally, you would like to make sure that the AMP variant uses equivalent content. 

This includes embedded content metadata, schema, and a tag pointing to the canonical version. 

Other common issues to see here include ensuring that: 

  • The canonical URL returns a legitimate status code. 
  • The canonical doesn't have any 3XX, 4XX, or 5XX errors. 
  • The canonical reference within the AMP version isn't canonicalized. 
The trailing slash may be a common error here. 

For example, the AMP variant may reference the non-trailing slash because of the canonical, whereas actually the canonical may use the trailing slash, or redirect to the trailing slash version. 

2. Non-Indexable AMP Errors 

Another common mistake when it involves AMP implementation is ensuring that the AMP variant is indexable. 

For example, you’ll see errors if the AMP variant is blocked at robots.txt, or if it contains a no-index meta robot tag. 

Make sure to examine the HTML page source of the AMP variant to make sure that the page is accessible to Google. 

At the browser level, this will be done by employing a simple free robots exclusion checker

robots exclusion browser checker

Or you could even use Google’s URL inspection tool to validate that Google can crawl the AMP variant. 

3. AMP Has Validation Errors 

The most common validation errors fall under the subsequent three buckets. 

  • Missing mandatory elements. 
  • Including disallowed, depreciated, or duplicated elements. 
  • Containing style, layout, or templating errors. 
The best way to diagnose and fix these errors is to equip your development team with the AMP validator. 

This tool will flag up any of those errors and may be used as a raw HTML code validation tool to assist your team in proactively producing clean AMP-compliant code. 

It’s also good to supply your team with Google’s AMP validation error guide. And if your site is on WordPress, the AMP plugin troubleshooting guide is useful. 

4. AMP Analytics Errors 

Google features a great guide for measuring AMP pages in analytics. However, forgetting to hitch up AMP versus non-AMP sessions remains a standard mistake in AMP implementation. 

This is particularly prevalent in news publishers because the majority of their AMP pages are served from Google’s AMP cache

This is why tons of publishers report a rise in bounce rate with their AMP versus non-AMP pages. 

This is because when a user is on the AMP cache, they're not on your actual website — they’re on Google’s servers. And when a user clicks another article link to read, the user moves off the AMP cache and back to the publisher’s website. 

What tons of publishers don’t realize is that if the AMP sessions aren't joined to non-AMP URLs, this will artificially inflate user and session counts. 

To remedy this error, you would like to line up the AMP linker when implementing AMP and measuring user journeys across the AMP Cache

More Resources for Testing AMP 

Google has created a useful guide to AMP validation errors. Check it out when debugging the more nuanced AMP validation errors. 

If you would like to require advantage of the page experience boost AMP can provide, it’s well worth thoroughly testing to make sure there are not any errors standing between you and AMP's success. 

Post a Comment

Thanks For Commenting We always appreciate your opnions.

Previous Post Next Post