Summary: In this page, I am going to explain how to build a PWA using AMP and get it verified by Google Lighthouse and Google Search Console AMP Audit. Click here to see the github repository of working source code.

1. Build an AMP Page

There are many articles and documents about how to build AMPs, so I’d like to skip the basic principles and knowledge of AMP.However, if you don’t know AMP very well, that’s OK. There is a cool AMP builder tool ready for you (yes, it’s free). It is called Mobirise.

After you download and install Mobirise, you can start building your first AMP page. Just drag and drop your blocks to your page then customize them as you like. After you are done, click Publish button in the toolbar to export generated AMP source code to your local hard drive, FTP server or even a github repository.

2. AMP Validation Check

I strongly recommend to do this test before deploying your AMP. If your web app contains invalid AMP pages when Googlebot crawls your page, it will show error messages. You should fix them all and resubmit your changes to Google. It will take more than a few days for Google to parse and validate your AMP again.

You can generate your sw.js(javascript file for service worker) using workbox-cli. You can find the full guide of how to generate sw.js for AMP in here. Generated source code for sw.js might look like this one:

4. AMP in Google Search Console

If you add your AMP to your search console, AMP tab will be added to sidebar:

When Googlebot crawls your page, it will check AMP validity of your web app. If validity check fails, Google will let you know what is wrong with your web app.

If that happens, you need to fix all errors and submit changes to Google to let it check your web app again. But it will take 3 ~ 4 days to complete. Google will send you a message once your web app passed AMP audit.