Skip to content

Troubleshooting guide

ERR_CONTENT_DECODING_FAILED: how to fix it

The server said the response was compressed (gzip or Brotli) but the browser could not decompress it. The page is broken for everyone using that browser.

3 min read10 sectionsUpdated

On this page

Key points

  • The Content-Encoding header lies about the body.
  • Double compression (app and proxy) is a classic cause.
  • Stray bytes before compressed output break it too.
  • Test with curl and compare raw and decoded responses.

What it means

The Content-Encoding: gzip (or br) header tells the browser to decompress the body. If the body is not compressed, is compressed twice, or is truncated, decompression fails and Chrome shows ERR_CONTENT_DECODING_FAILED.

Common causes

  • Both the application and the web server or CDN compressing the response.
  • An application sending the header but plain text.
  • Whitespace or warnings printed before compressed output (PHP).
  • Responses truncated by a proxy.
  • Corrupted cache entries at a CDN.

Fixes if you are visiting the site

  1. Clear the site’s cache and reload.
  2. Try another browser; if all fail, the site must fix it.

Fixes if it is your site

Compress in one place only (usually the web server or CDN). Check what is actually sent with and without accepting compression, and purge CDN caches after fixing.

bash
curl -s -H "Accept-Encoding: gzip" -D - -o body.gz https://example.com | grep -i content-encoding
file body.gz       # should say gzip compressed data
gunzip -t body.gz && echo OK

Is it your device, your network or the site?

Work outward in three quick tests. First, open the same address on another device on the same network: if it fails there too, your device is not the cause. Second, switch that device to another network, such as mobile data: if it now works, the problem is your Wi-Fi, router, DNS or a filter on that network. Third, check the site from outside with an independent checker: if it fails from there as well, the site itself is down and only its owner can fix it. Write down the exact error code at each step; support teams can act on ERR_... codes far faster than on "it does not load".

How site owners catch this before visitors do

Most visitors who hit ERR_CONTENT_DECODING_FAILED leave without telling you. An uptime check every minute, with a keyword assertion on the page and an SSL check on every run, turns this from a support ticket into an alert. Keep the history: errors that come and go (one region, one server behind a load balancer, one in twenty requests) only make sense on a timeline. Put the result on a status page so people stop guessing. You can test any address now with the free website down checker.

Frequently asked questions

Is it a browser bug?

Almost never; the server sent a body that does not match its headers.

Can a CDN cause it?

Yes, by compressing an already compressed response or caching a broken one.

How do I enable compression correctly?

Pick one layer; see enabling Brotli compression.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.