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
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:
https://example.com/.well-known/amphtml/apikey.pub
.Let us know how it goes.
Hope this helps.
You can also consider fetching the cached AMP page which also automatically updates the AMP cache (provided that your source content expires appropriately).
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.