Skip to content

How to enable Brotli or gzip compression

Best practices1 min readFixes check brotli-or-gzip

Text files shrink by 70–90 % when compressed on the server. It is one setting in nginx, Apache or your CDN.

Step by step, with screenshots: Apache .htaccess for an A grade: headers, redirects, caching →

Check your own site

Runs this check and the other 186, free, in about 45 seconds.

What a passing site looks like

  • Text files are compressedwarning · −2 ptseffort S

Text compression

Why it matters. HTML, CSS and JavaScript shrink by 70–90% with gzip or Brotli. Sending them uncompressed wastes visitors' data and seconds, especially on mobile.

How to fix it.
  1. Enable Brotli (or gzip) for text types in your server, hosting panel or CDN; Cloudflare and most hosts have it as one switch.
  2. Check the files in the technical detail; third-party ones need the vendor to fix it.

Filed under Best practices. Copy is generated from the same catalogue that scores every report, so what you read here is what the report says.