Cloudflare is blocking CSS and JavaScript files

What is the name of the domain?

bogevanghytten.dk

What is the error number?

404

What is the error message?

Not found

What is the issue you’re encountering

Cloudflare is blocking CSS and JavaScript files

What steps have you taken to resolve the issue?

Enabled development mode.

What feature, service or problem is this related to?

I don’t know

What are the steps to reproduce the issue?

My website, bogevanghytten.dk, has been running flawlessly via Cloudflare for years now. But suddenly, without me doing anything, Cloudflare started blocking, or at least not returning, some CSS and JavaScript files from the website.

Unfortunately, the error comes and goes. Sometimes I have no issues, sometimes the same files get blocked by Cloudflare.

When the problem occurs, I can go into Cloudflare’s dashbord under Caching and enable Development Mode. Then everything works again. As soon as I disable development mode, Cloudeflare blocks the same files again.

Where do I look to debug this issue? What could possibly have changed such that Cloudflare won’t serve specific CSS and JavaScript files?

By “blocking” I mean that Cloudflare is returning HTTP status 404 Not Found.

Screenshot of the error

Additionally, sometimes Cloudflare won’t even serve the root element (a ASP.NET webpage). Like here:

I know that the server is slow on the first request as the hosting provider aggressively kills running processes to save ressources, so first hit is always a bit slow due to warmup of the website. Does Cloudflare have a very low tolerance for this?

But again, the website has been slow like this for years without issues. But some time during the weekend, something changed and Cloudflare startede behaving differently.

The 404 page that’s returned is coming from IIS. 404s can only come from the origin(*), Cloudflare would return 403 if blocked and 5XX errors for requests that timeout/abort/are corrupted.

If you pause Cloudflare, or set the DNS records to “DNS only”, then you can see what the server is doing directly.

(*) it’s possible a Cloudflare rule you have set is modifying the request to cause this if you find it’s only happening when Cloudflare is enabled, check the Cloudflare Trace tool to verify.

2 Likes

Thanks. I’ll look into it and try out the trace tool.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.