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?
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.
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.
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 )
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 188.8.131.52 . I’m having trouble finding the `Cf-Cache-Status’ in the network tab of the dev tools.
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 184.108.40.206 . I’m having trouble finding the `Cf-Cache-Status’ in the network tab of the dev tools.
hmm, emerion.ca is not even going through CloudFlare, it’s set with grey cloud , and it’s pointing directly to the DigitalOcean IP, so it’s definitey not a CloudFlare issue
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.
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).
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).
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?
Turning the cloud back on I get my server as cloudflare.
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.
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.
Ok great, thank you so much for helping me get to the bottom of this.