Guides · Performance

Compression (gzip / Brotli)

One of the checks in every audibot report. This page says exactly what audibot reads, what passes, and how to fix it.

What audibot checks

The Content-Encoding of the home page response. audibot asks for br, gzip, deflate.

Why it matters

HTML is repetitive text, and compression typically makes it several times smaller on the wire. That is time every visitor waits on a slow connection.

How do I enable gzip or Brotli compression?

Turn on gzip — every server supports it — and Brotli if the server or CDN has it. Compress text types only; images and video are already compressed.

nginx

gzip on;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
# text/html is always compressed once gzip is on

Apache (mod_deflate)

AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/json image/svg+xml

Caddy

encode zstd gzip

Check

curl -sSI -H 'Accept-Encoding: br, gzip' https://example.com/ | grep -i content-encoding

Related tools

Other checks in Performance

Performance in the methodology ·All guides

This check is one step of the website launch checklist.

Check your site

audibot runs this check and every other one in a single audit, and publishes the report with a recommendation for each finding.