Cloudflare Docs
Speed
Speed
Edit this page on GitHub
Set theme to dark (⇧+D)

Content encoding issues

If you are noticing any encoding errors with your HTML pages, we recommend verifying that the impacted pages are explicitly setting the correct charset in the Content-Type header from your origin for all text/html pages, for example Content-Type: text/html; charset=utf-8. This is particularly important if you are not using UTF-8 encoding. Alternatively you can set the correct charset within the HTML.

If you believe these settings are correct, please inform us. You can find more information in setting the HTTP charset parameter and in HTML charset attribute.

Alternatively, you can use a Configuration Rule to disable features that rewrite HTML. This will send the content as-is to the browser.

You also have the option to turn off these features site-wide within the dashboard:

Misconfiguring the Content-Type or charset within HTML, or leaving them unspecified can lead to unintended consequences. This can disrupt the intended content presentation, resulting in disorganized rendering and potentially unclear characters. Properly configuring these elements ensures consistent and accurate interpretation, correct HTML modifications, and accurate rendering for browsers. This creates a seamless user experience and aligns with best practices in web development.