406 error - Client browser does not accept the MIME type of the requested page

Certain URLs ending with xml.gz on my website are returning this error: “406 - Client browser does not accept the MIME type of the requested page.”

If I visit the URLs without going through Cloudflare by using a hosts.ini file modification, then I don’t get the error.

I have triple checked that the files are on the server (Windows + IIS). It’s just that Cloudflare isn’t delivering them correctly for me (and anyone else who visits the URLs). These are gzipped site maps, so it’s important to me that Google can fetch them; right now, it cannot.

This error is new, by the way. I never had it before. I’ve made no changes to the files or to the servers. Did something change at Cloudflare?

An example page is https://www.gaebler.com/sitemap-us-vc-firms.xml.gz

Thanks if anybody can help.

OK, well it seems that if I purge these error-inducing files from my Cloudflare cache and wait a minute, then the error goes away. I still have no idea why this would be happening but at least I’ve found a short-term solution. It’s a bit scary that Cloudflare is throwing random 406 errors when it shouldn’t. I happened to catch these, but makes me wonder how often does this kind of thing happen and I just lose the visitor.


Maybe setup a cache rule to bypass the cache on the path so that the files arent getting cached as that might be the error. You can do this in your cache rules in the Cloudflare dashboard. Here is an example.

After setting up the role, purge your cache and then see if it fixes your issue, if not let us know.

All the best!