Skip to content

Technical pillar / check compression

HTML compression: is the page sent compressed?

We read the Content-Encoding header of each page we audit and check whether the server compressed the HTML with gzip, Brotli, deflate or Zstandard. Compression makes the page smaller on the wire, so it arrives sooner for visitors and costs crawlers less.

By , Founder and CEO, Own The Climb · Last updated

This is how we check it

We check whether your server sends each page's HTML compressed.

  • We read the Content-Encoding header on the response, as your server sent it.
  • gzip, Brotli (br), deflate or Zstandard (zstd) passes. No compression is a low finding.
  • We do not measure how much smaller the page gets, and we do not check images or scripts here.

Our reasoning behind this

HTML is text that compresses well, and Google's crawlers accept compressed pages. A compressed page finishes downloading sooner on a slow phone connection, which helps your main content appear sooner.

How we would fix it on your site

  1. Turn on Brotli and gzip for text files (HTML, CSS, JavaScript, JSON and SVG) at your CDN or web server.
  2. Check with "curl -sI -H 'Accept-Encoding: br, gzip' https://your-domain/" and look for a Content-Encoding line.

Once your change is live, run the audit again and review the new findings alongside the pages it covered.

How to make the change on your platform

What to do on each platform
PlatformWhat to do
WordPressMost managed WordPress hosts compress by default. On your own server, a caching plugin such as W3 Total Cache or WP Rocket can add the server rules, or ask your host to enable it.
Shopify, Squarespace and WixCompression is handled by the platform. If the finding appears, check for a proxy or CDN of your own between the platform and visitors.
Next.jsVercel compresses responses at its edge. When you run next start yourself, the built-in gzip is on by default (the compress option in next.config); behind nginx or a CDN, let that layer compress instead.

What we want you to review

  • Enable response compression at the origin or a CDN that serves the page.
  • Check whether a proxy decompresses a response to change it and then sends the page onward uncompressed.
  • Compress dynamically generated HTML as well as static files.
  • Serve an encoding the client accepts. Googlebot advertises gzip, deflate and Brotli, so a Zstandard-only response is insufficient for those requests.

The exact rules our audit applies

We wrote this part for your developer or your SEO specialist. It sets out the inputs, scoring rules and confidence limits we publish for this check, together with the full explanation of how we would fix a finding.

The inputs we describe for this check

The Content-Encoding header on the response for each page's HTML, as your server sent it on the wire (when we render a page, we keep the encoding the site sent, not the decoded copy the browser was handed). The check passes when the header names gzip, br (Brotli), deflate or zstd (Zstandard).

We do not measure how much smaller the compressed page is, and we do not check images, scripts or style sheets. When we read a page through a service that does not pass on response headers, we say so and do not grade it.

Our full reasoning

Google documents that its "crawlers and fetchers support the following content encodings (compressions): gzip, deflate, and Brotli (br)", and that each crawler lists what it accepts in its Accept-Encoding header. HTML is text that compresses well, so a compressed page finishes downloading sooner on a slow phone connection, which helps Largest Contentful Paint, a Core Web Vital.

Compression does not change what is in the page: Google says its 2 MB HTML crawl limit is applied to the uncompressed data, so compression helps speed, not how much of a long page Google reads.

How we score what we find

Measured, on every page we read. A response with no Content-Encoding is a LOW technical finding. A compressed response passes and shows the encoding.

A page whose headers we could not see is shown as not measured and does not count toward the score.

How sure we are of each result

HIGH: the header is what your server sent to our crawler. A server may compress for some clients and not others. Very small pages are sometimes left uncompressed on purpose, which costs little.

How to fix it, in full

Turn on Brotli and gzip for text responses (HTML, CSS, JavaScript, JSON and SVG) at your CDN or web server. On Apache, enable mod_deflate or mod_brotli; on nginx, set "gzip on;" with gzip_types for text, or add the Brotli module. Check the result with "curl -sI -H 'Accept-Encoding: br, gzip' https://your-domain/" and look for a Content-Encoding line, then re-run the audit.

The sources we rely on

What we have changed on this page

  • · Rewritten in plain words: what we check, why it matters and how to fix it come first, and the full rules sit one click down. We corrected the full rules to describe only what we check today.
  • · On the homepage, the header is read from our own HTTP request for the page whenever we made one, as the HTTPS and mixed-content checks already did, so a page read through a service that drops headers is still measured.
  • · Initial publication of what the compression check reads.