Persistent caching issue on custom domain

Loom or read below

I have made a change to switch out 3rd party reviews widgets.

The default url shows it (shows google reviews, which is correct)

But the custom domain doesnt, this is even after 4 days, flushing cache (both locally and via netlify), trying multple browsers and devices.

I have tried using proxy browsers and some show it, others don’t

I am trying to find a bullet proof way to absolutely get rid of the old version that doesnt seem to go away



Hi, @vinaeco. You have Cloudfront configured as a caching proxy layer using Netlify as an origin.

When I make a request to the URL you shared, I get a response that has been cached since August:

$ curl -H "Accept-Encoding: br, gzip, deflate" -svo /dev/null --stderr -  | egrep '^(<|>)'
> GET / HTTP/2
> Host:
> User-Agent: curl/8.1.2
> Accept: */*
> Accept-Encoding: br, gzip, deflate
< HTTP/2 200
< content-type: text/html; charset=UTF-8
< content-length: 23640
< accept-ranges: bytes
< content-encoding: gzip
< referrer-policy: same-origin
< server: Netlify
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-content-type-options: nosniff
< x-frame-options: DENY
< x-nf-request-id: 01H6VZ2KVM0V8528ZE825XV07W
< x-xss-protection: 1; mode=block
< cache-control: public, max-age=31536000, must-revalidate
< date: Thu, 03 Aug 2023 03:34:01 GMT
< etag: "62f38f1ebb5654e28fc539037af74c2f-ssl-df"
< vary: Accept-Encoding
< x-cache: Hit from cloudfront
< via: 1.1 (CloudFront)
< x-amz-cf-pop: HIO52-P1
< x-amz-cf-id: 5AjokxKdygJUUR2tI6svsZfR9PQS--rUsOf2Guz5YT6ZGk0VhVV4xg==
< age: 5268742

The age header value above is 5268742 (which is nearly but not quite 61 days) and the date header makes it clear this URL has been cached by Cloudfront since August 3rd (date: Thu, 03 Aug 2023 03:34:01 GMT).

So, yes, there is a caching issue but the issue is in your Cloudfront configuration which Netlify didn’t create and does not control. The required fix for this caching issue is in Cloudfront and only you can make those changes.

If there are other questions about this, please let us know.