Google AMP (Accelerated Mobile Pages) is a new service from Google that has been designed to drastically speed up mobile content.

By caching your content, Google can serve your page exactly as it appears but without having to fetch any data from your own server.

You may already have seen (on your mobile device) some pages being shown in the Google SERPs with AMP written underneath. You’ll notice that when you click on these items that the content is served by Google itself.

I have replaced the theme of this website to use Amplify (link in the footer) which has a built-in template for serving an AMP version of this blog.

As this website is served through cloudflare initially the validator for AMP didn’t work. This is due to cloudflare injecting it’s own javascript into the content of the page.

There are typically 3 separate settings within cloudflare that you (currently) need to turn off in order to pass validation.

  • Rocket Loader
  • Mirage (for those of your with Enterprise Plans)
  • Email Obfuscation

Once this is done you should be able to validate your domain with the following url robkent.co.uk/#development=1. Then within Google Chrome tools you should see the validation within the console.

You can view the source for this fix on the Google AMP github issues page.

Robert Kent

Just a web developer

robertkent kent_robert


Published