Cloudfare continuing to serve a cached version of my site. Cannot update my site

cache

#1

Cloudflare is pointing my custom url to my surge.sh instance using a cname to my surge.sh subdomain and an A type to surge.sh’s IP address. Surge.sh’s cache directive is to high but has a revalidate flag. After contacting Surge.sh’s community their diagnosis is that Cloudflare is ignoring surge.sh’s re-validate flag and not picking up the update on my surge subdomain. I’ve done everything from purge everything in my cache to set up rules to limit cloudflare’s TTL. It’s been a week so far that my site has not been able to update. Even by completely redeploying to a seperate surge subdomain it doesn’t make a difference. My app is Nuxt js and requires an environment which can serve the client. Any advice?


#2

Without having the time to dig deeper at the moment
Have you tried ‘Respect existing headers’?

Purge everything and wait. Least 30 seconds. Also clear the browser cache or check again in incognito mode.


#4

If you open DevTools and go to the network tab, you can see each request the browser makes and the headers of those requests. I recommend looking for the Cf-Cache-Status Header for any request you think should be cached and note what the status is.


#5

If you give the url of the page affected and the real server IP we can check if the issue exists, (it never happened to me in years and 100+ sites on :logo:)


#7

Hi Judge and francesco, the custom url is emerion.ca and the surge url i’m using as my cname is corporateemerion.surge.sh . The A type IP address i’m using is 45.55.110.124 . I’m having trouble finding the `Cf-Cache-Status’ in the network tab of the dev tools.


#8

Hi Judge, the custom url is emerion.ca and the surge url i’m using as my cname is corporateemerion.surge.sh . The A type IP address i’m using is 45.55.110.124 . I’m having trouble finding the `Cf-Cache-Status’ in the network tab of the dev tools.


#9

hmm, emerion.ca is not even going through CloudFlare, it’s set with grey cloud :grey:, and it’s pointing directly to the DigitalOcean IP, so it’s definitey not a CloudFlare issue


#10

Hi MarkMeyer, thank you so much for your prompt response.

I set Browser Cache Expiration to Respect Existing Headers and purged everything. I waited 30 seconds and checked in incognito. I’m not seeing my update yet. I’ll wait further and report back if I get lucky. Are there any other places I should be setting the TTL to Respect Existing Headers. In my DNS I have everything set to automatic.


#11

You’ll want to go to the network tab, then refresh the page, then click on the first request in the list (or the request of static files you think should be cached).

image

Check for Cf-Cache-Status and ensure the server header returns cloudflare. If it doesn’t show cloudflare in the server header, the issue is likely as @francesco describes (the DNS record does not go through Cloudflare).


#12

Hi Judge,

You are correct. I turned the Cloud off and it is going straight through to Surge. There is a very high expiration but a must-revalidate flag. I guess the expiration needs to be manipulated as the must-revalidate is being ignored?


#13

Turning the cloud back on I get my server as cloudflare.

44%20PM


#14

Hi Judge,

Sorry for spamming with replies.

I clicked on the app.js file and am see the expired cf-cache-status.

I’m a little perplexed right now as to what to do about this to get my update picked up.


#15

From the above linked “what do the cache headers mean”:

EXPIRED: resource was in cache but has since expired, served from origin server

This means the resource was served directly from your origin server.

Since you showed you’re also running SurgeCDN, and the surgecdn Response-Time header is still there, chances are SurgeCDN still has the old version of your file cached.


#16

Ok great, thank you so much for helping me get to the bottom of this.