3

I have a url from a site that is showing up on the google amp cache with some critical mistakes and i need to clear the cache. I have followed the guide here https://developers.google.com/amp/cache/update-cache. This is most definitely the most complicated solution for such a simple action I have ever seen, but it seems to be the only way to do it.

I think I have followed the steps correctly (although i have doubts about the signature generation). When i try make a GET request to the final url, i get a 404. Even if i did generate the signature wrong, the url should give a 400 and not a 404. I want to clear a url from the google cache. I used the cache url listed here https://cdn.ampproject.org/caches.json to produce a URL like this.

https://mysite-net.cdn.ampproject.org/update-cache/c/s/mysite.net/amp/post/url-slug-for-post?amp_action=flush&amp_ts=1505064143amp_url_signature=big-long-base64-encoded-string

I tried to hit the same url with the signature excluded and still got the 404, my thinking is that the code was altering the url somehow to cause the 404 (even though i used a url encode on the special characters).

Can anyone give me advice here? I simply want google to refresh the cache for this page. It has been 3 days and it has not happened automatically. I have access to the webmaster page, but this doesnt have any options for clearing the cache.

4

You can generate the correct URL of your AMP page here: Get correct AMP URL here

You enter your URL and you will get the AMP cache URL

Then you must visit that URL The cache update will not be immediate anyway

  • So all i need to do is visit the url in a browser with no addition signatures or url variables? In order words a simple GET request to the url that the tool you linked to generates? – Dan Hastings Sep 12 '17 at 8:10
  • As for Google instruction YES: "Each time a user accesses AMP content from the cache, the content is automatically updated, and the updated version is served to the next user once the content has been cached." from: link then it does not specify when the content will be cached... – Massimiliano Rubino Sep 12 '17 at 8:18
  • This doesn't seem correct though. I searched the same thing every day and clicked the result on Google. Each day I was given the outdated result. Today it has finally refreshed, 5 days after I made the initial change. Could it also be caching per IP or something? – Dan Hastings Sep 12 '17 at 8:20
  • It could also for that or other thing. But important is that is cached correctly now. Yes it takes a while. The sentence: "once the content has been cached" means everything: from 1 second to we don't know when..., but let's say that after a week is OK. – Massimiliano Rubino Sep 12 '17 at 8:29
  • That's my issue though. 1 week is far too long to wait particularly when a result has a critical mistake that needs to be corrected. I need a way to clear the cache immediately so that no other users have to see the incorrect result – Dan Hastings Sep 12 '17 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.