What is AMP and how can I use it?
Accelerated Mobile Pages (AMP) are static pages that are rendered very quickly tailored towards mobile users. AMP uses a stricter flavor of HTML in order for mobile browsers to load faster. Please note that a standard web page isn't AMP compatible by default; your web page must be written in compliance with the AMP format. Domains on Cloudflare CNAME setups cannot utilize AMP Real URL. As a workaround, you can add the following CAA records in your authoritative DNS (the example below assumes that Cloudflare has issued a certificate from Digicert CA):
example.com IN CAA issue "digicert.com; cansignhttpexchanges=yes" example.com IN CAA issuewild "digicert.com; cansignhttpexchanges=yes"
Helpful background on AMP:
Things to remember:
- Validate your AMP page
- Make sure that your AMP page is discoverable
- AMP will only appear for external links
How can I validate an AMP enabled page?
Accelerated Mobile Pages require a particular structure to enable AMP features. If you'd like to know about creating an AMP enabled page, you can find out more at AMP Project's - Create your first AMP page.
Validate your existing AMP enabled pages in one of three ways:
- Using AMPProject.org Validation - Enter your URL through an AMP validator to look for warnings and/or errors: Validate your AMP page
- Using Chrome Developer Tools - Validate your AMP enabled pages through Chrome Developer Tools:
- Open your AMP page in your browser
- Append "#development=1" to the URL, for example, http://localhost:8000/amp.html#development=1.
- Open the Chrome DevTools console and check for validation errors.
Learn more about all of these tools and how to fix certain validation errors at AMP Project validation options.
Can I use WordPress with AMP?
Yes! Accelerated Mobile Pages are designed to speed up external AMP enabled articles on your Cloudflare enabled site. If you have a WordPress site and would like to make it AMP enabled, the WordPress AMP Plugin will do this automatically.
Once you've installed the plugin, test the functionality by adding
?amp=1 to the end of your WordPress URL (For example: https://example.com/2016/01/01/amp-on/?amp=1).