Skip to content
FunnelGuard

Fix guide by FunnelsGuard

No gzip or Brotli compression: how to check and fix it

PRF-057Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

Compression shrinks text files before they travel over the network. The browser says which formats it understands in the Accept-Encoding request header. The server replies with a compressed file and a Content-Encoding header such as gzip or br (Brotli).

This issue exists when that reply header is missing for text files: HTML, CSS, JavaScript, JSON, SVG and fonts like .ttf or .otf. The files arrive at full size. Images such as JPEG, PNG, WebP and AVIF are already compressed, so they should not be gzipped again.

Why it costs you leads or sales

Text files often shrink a lot when compressed, so skipping it means more bytes on every page view. On slow mobile connections, which is where a lot of ad traffic arrives, that delay shows up before the page can render. Slower pages tend to lose visitors before they see your form or offer.

Page weight of text files with and without compressionExample numbers
Page weight of text files with and without compression (example)No compression: 600 KB; gzip: 190 KB; Brotli: 165 KB0230460600190165No compressiongzipBrotliKB

Example: a landing page with 600 KB of HTML, CSS and JS uncompressed might transfer well under half that with Brotli. Your numbers will differ.

Where uncompressed text slows the funnel
  1. Ad clickVisitor lands on your page
  2. Download HTML/CSS/JSSent at full size, no content-encoding
  3. Page rendersAppears later than it should
  4. Form or checkoutSome visitors leave first

The delay builds up before the visitor can see or use the page.

How to check if your site has it

Check compression in your browser
  1. Open DevTools

    In Chrome or Edge, press F12 and open the Network tab. Tick Disable cache, then reload the page.

  2. Find the document and scripts

    Click the first row (the HTML document), then a CSS file and a JS file.

  3. Read the response headers

    Under Headers, look at Response Headers for content-encoding. You want br or gzip (or zstd). If it is missing on text files, compression is off.

  4. Compare sizes

    Right-click the column header and add Size and Content (or look at transferred vs resource size). If both are the same for a text file, it was not compressed.

Check from the command linebash
curl -s -o /dev/null -D - -H "Accept-Encoding: gzip, br" https://example.com/ | grep -i content-encoding

# Check a CSS or JS file too
curl -s -o /dev/null -D - -H "Accept-Encoding: gzip, br" https://example.com/style.css | grep -i content-encoding

No output from grep means no content-encoding header came back. Lighthouse and PageSpeed Insights also report this as "Enable text compression". If you export a HAR file from DevTools, search it for content-encoding on each text response.

How to fix it

The right place to fix it depends on your setup. If a CDN sits in front of your site, turn it on there first. Otherwise enable it on the web server. Brotli usually gives smaller files than gzip, and gzip is a good fallback for everything else.

Turn on compression by platform
  1. Check your host first

    Many managed hosts already compress. If yours does not, ask support to enable gzip or Brotli.

  2. Use a caching or performance plugin

    Plugins such as WP Rocket or LiteSpeed Cache include a GZIP compression option in their settings. Turn it on and clear the cache.

  3. Or edit .htaccess (Apache)

    Add the mod_deflate block from the Custom code tab below, above the WordPress rules. Back up the file first.

Nginx: enable gzip for text filesnginx
gzip on;
gzip_vary on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_types text/plain text/css text/xml application/json application/javascript application/xml image/svg+xml font/ttf font/otf;
Apache .htaccess: enable mod_deflatehtaccess
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml
  AddOutputFilterByType DEFLATE application/javascript application/json application/xml
  AddOutputFilterByType DEFLATE image/svg+xml font/ttf font/otf
</IfModule>
Response headers for style.css

Before

  • No content-encoding header
  • Transferred size equals file size
  • Lighthouse flags Enable text compression

After

  • content-encoding: br or gzip
  • vary: Accept-Encoding present
  • Transferred size much smaller than file size

How to confirm it's fixed

Confirmation checklist
  • Clear server, plugin and CDN caches.
  • Reload with DevTools open and Disable cache ticked.
  • The HTML document, main CSS and main JS show content-encoding: br or gzip.
  • The curl command returns a content-encoding line for each file type.
  • Images are not listed with a content-encoding header.
  • Lighthouse no longer shows Enable text compression.
  • Test the page with a form or checkout still working end to end.

How to prevent it happening again

Compression often disappears after a host migration, a server upgrade, a new CDN or a changed proxy rule. It can also be lost when someone replaces an .htaccess or Nginx config file.

Habits that keep it on
  • Include a content-encoding check in your go-live and migration checklist.
  • Keep the compression rules in version control with the rest of your server config.
  • Re-run Lighthouse or PageSpeed Insights after hosting, CDN or plugin changes.
  • Set up one compression layer (CDN or origin) so that two layers do not fight each other.
  • Add new text file types, such as a new font format, to the compression list.

How FunnelGuard handles this

FunnelGuard does not check this yet. Compression checks on content-encoding are a possible future addition, but today there is no alert for it.

What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, from the EU or the US. It checks each step, the tracking hits and whether test leads arrive. If a page becomes so slow that a step fails, that failure can be re-checked from a second region before one alert goes out, with a screenshot and a likely cause. That covers the symptoms, not the missing compression header.

To watch for compression yourself, schedule a monthly Lighthouse or PageSpeed Insights run on your key landing pages, and run the curl command above after every hosting, CDN or plugin change. You can start with the Free plan (1 site, 2 journeys, daily checks, no card) to keep your journeys monitored while you do this.

Questions people ask

How do I check if gzip or Brotli is enabled on my website?

Open DevTools, go to the Network tab, reload the page and click the HTML document. Look for content-encoding: gzip or br under Response Headers. You can also run curl with an Accept-Encoding header and look for the same line.

Why is my site not using gzip compression even though I turned it on?

Common causes are a CDN or proxy that strips the Accept-Encoding header, a cache that stored an uncompressed copy, or rules placed in a file the server does not read. Clear all caches, then test the origin and the CDN separately to see which layer drops it.

Is Brotli better than gzip?

Brotli usually produces smaller text files than gzip at similar settings, and all current major browsers support it over HTTPS. Keep gzip enabled as a fallback so older clients still get compressed files.

How do I enable gzip compression in WordPress?

Ask your host to enable it, turn on the GZIP option in a cache plugin such as WP Rocket or LiteSpeed Cache, or add mod_deflate rules to .htaccess on Apache. On Nginx you need to edit the server config instead.

Should I compress images with gzip?

No. JPEG, PNG, WebP and AVIF files are already compressed, so gzip saves almost nothing and uses extra CPU. Compress text files such as HTML, CSS, JavaScript, JSON and SVG, and optimise images separately.

Does missing compression hurt my Google Ads or SEO results?

It makes pages heavier and slower to load, which can affect user experience and page speed scores. It is usually a medium-impact problem, not a full outage, but it is cheap to fix and helps every visit.

Does FunnelGuard check for gzip or Brotli compression?

Not yet. It is a possible future check. For now, test with browser DevTools, curl, Lighthouse or PageSpeed Insights.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.