Cloudflare NOT respecting existing headers!


I have a php file, and after hours of troubleshooting to figure out why after I turned over things to Cloudflare my page (rendered from said php file) wasn’t responding correctly anymore, I positively was able to establish that even though I have headers explicitly set up to no-cache in the file, Cloudflare still cached the resource! And I did not have any page rule set up to override what I explicitly requested in the headers.
I don’t need a reply that tells me “oh, maybe you didn’t do this, maybe you didn’t that, blah blah blah…” because I am positively telling you that Cloudflare cached my php file whereas the header said not to cache it. I am very sure that something is wrong on the Cloudflare side, and I want to know why Cloudflare is so aggressive in caching even resources that have been marked to not be cached, please give me an answer to that, why??? Why???
Please don’t reply to my question with more questions, if you don’t know the answer then please don’t reply.
Cloudflare is caching resources it was asked to stay off of, and I want to know why this is the case and how to stop it, because it essentially means Cloudflare is not doing what it claims in its documentation. I read all the caching docs on Cloudflare I could find, and this behavior is not supposed to happen; this is very fishy.


Cloudflare is no even supposed to be caching php files unless a page rule is set! So, the fact that it is caching a php file, ignoring all rules is really a failure

Please post an example URL where you encounter this issue. As it says right here in the Help Center:

The second way to alter what Cloudflare will cache is through caching headers sent from the origin. Cloudflare will respect these settings…

Please also post a picture of your page rules.



I have read all the docs I could find on Cloudflare caching, and I must say that it is likely impossible to follow their docs and get guaranteed results. This is why I’m here, to inquire from someone who through trial and error has been able to figure out the very convoluted and unclear directions (at least for what it seems to be now for me) on Cloudflare caching.
I have purged all the cache, and when I check the site on [] it still shows that Cloudflare is pulling out old cached copies and serving them.
I even set page rules, and it seems as though I absolutely set nothing!
This is extremely frustrating, to say the least.
Could anyone provide me with example of a header file and a page rule set for that header and what the outcome was?
Thank you!

Sorry to break the news to you, but page rules DO apply to header files because a rule set on a URL can modify headers on a file.

I appreciate your reply, but exercise more caution in replying next time or ask for clarification if you do not understand.