skip to Main Content

According to https://developers.google.com/amp/cache/update-cache to update the AMP cache I need to generate an RSA Key and place it at:
https://example.com/.well-known/amphtml/apikey.pub

Unfortunately due to CMS restrictions (Shopify) that URL is not possible to set up.
Are there any other ways of updating the cache?

Would a 301 redirect work?
The file would be actually stored on the CDN, different domain, something like: https://cdn.shopify.com/s/files/1/3201/2492/files/apikey.pub

Thank you

3

Answers


  1. I have used URL redirect (provided by Shopify) to link images in Outlook signatures. So yes, my guess is that it should work.

    Try the following:

    1. Place the RSA key in Google Drive (since Shopify will not allow .pub files as far as I am aware) – Don’t forget make the file public so Google can access it.
    2. Create a URL redirect linking the location of your RSA key with the link https://example.com/.well-known/amphtml/apikey.pub.

    Let us know how it goes.

    Hope this helps.

    Login or Signup to reply.
  2. You can also consider fetching the cached AMP page which also automatically updates the AMP cache (provided that your source content expires appropriately).

    Login or Signup to reply.
  3. What Hamza suggested sounds like it might work, however, here is my recommendation:

    Send the pub key and your reason for requiring it on the server to Shopify. If you have Shopify Plus, you will not be the first person requested things and they will accommodate you by placing the key at the desired location.

    Sorry it is not more technical, but you are truly bound your CMS.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search