My website is not being cached and Cloudflare is always giving a BYPASS for me.
I’ve checked the responses from the origin server, but nothing indicates it should give a BYPASS.
Here are the related headers:
last-modified: Wed, 18 May 2022 22:21:09 GMT
These are static assets like CSS, JS, HTML and they don’t change at all. When there is a new version, the application itself requests a new file with a new filename.
Redbot also says:
The resource last changed 8 hr 8 min ago.
This response allows all caches to store it.
I have a Cloudflare rule setup for:
circles.gallery/_app/ Cache Level: Cache Everything
Example of an asset is:
How can I debug this further? What else should I check?
please append an asterisk at the end, like this:
then this rule gets not solely applied to the matching directory, but additionall to all of its contained content aswell.
Please post the response header from the origin.
Please also post ALL of your PageRules from the overview.
Hello, sorry I mistyped my rule somehow, or it got deleted in the Markdown parsing maybe? I already have my rule setup as:
I dont have any other rule applied from Cloudflare.
Also, as I mentioned, cache-control header sent from the origin is
Here are all the headers returned:
HTTP/1.1 200 OK
Last-Modified: Thu, 19 May 2022 18:56:42 GMT
Date: Sun, 22 May 2022 07:57:03 GMT
That seems to be the problem. Please remove the leading asterisk ‘
’ and replace it with the scheme, so your rule becomes:
Then clear cache and try again.
Hmm but wouldn’t this leave out
Actually yes, but please first try it, so we see it the pattern now is matching, then we can go from there on.
I was referring to this page:
It says below:
To match every page on a domain and it's subdomains, write *example.com/*. Just writing example.com won’t work.
I’ve just changed the rule to what you said. Do you know how long does it take to propagate through the system?
I know, but lately some rules did not match their expected pattern. Thats why I asked for. Should have happened immediately. You can change it back - did not work.
ATM I am clueless, don’t know all you other settings so hard to say anything precise.
I just tried adding Edge Cache TTL, Browser Cache TTL along side Cache Everything directive. If it should have been activated immediately, it did not work as well.
Hmm, are there any other related piece of setting that might affect this? I devoured all the documentation and community questions available, but my setup looks okay.
The origin server is behind
render.com, not sure if they are not playing nicely somehow?
Possibly, it looks like render is using Cloudflare themselves, with their own IP addresses though
But I have an “
A record” pointing to my origin server IP. How could Render interfere with this traffic?
I’m not sure what I am saying is not very logical though.
Could you guide me to where can I send an email to Cloudflare Support for checking this out?
If you use a
CNAME to your onrender subdomain instead of an A record the IP, Cloudflare should send the traffic to your zone before going through Render’s.
Hmm I found a relevant discussion in Render’s community support page:
Will check using
CNAME, thank you!
Hmm now I am using a
circlesgallerywebsite.onrender.com, with Cloudflare proxying enabled.
I can now see
cf-cache-status: MISS header, rather than the BYPASS! I think this is a step towards the right direction?
Would using this configuration raise any other issues? Should I turn off the ?
There shouldn’t be any issues with this configuration. There are a number of Render users currently doing this. It was the recommended setup from Cloudflare.
Sorry the first request always is a MISS in cache, try to hardreload 2-3 more times. I ATM see HITs.
It was the recommended setup from Cloudflare.
I am very sure it was not like this a couple months ago when I setup the domain!
Thank you everyone! I am now seeing HITs starting to appear!
Will leave the docs here for others: Configuring Cloudflare DNS | Render