How to Enable Gzip and Brotli Compression
What the compression check tests
SiteCurl sends a request to your server with an Accept-Encoding: gzip, br header and checks whether the response comes back compressed. If the server responds with uncompressed HTML, CSS, or JavaScript, the check fails.
Compression is one of the highest-impact performance improvements you can make, and it requires zero changes to your site’s code or design.
Why it matters
Without compression, your server sends raw text files to the browser. A 100KB HTML file stays 100KB over the wire. With gzip, that same file drops to 20-30KB. With Brotli, even smaller.
This directly affects page load time, especially on slower connections. Mobile visitors on 3G networks feel the difference the most. Compression also reduces bandwidth costs if your hosting plan charges for data transfer.
How to fix it
Nginx
Add these lines to your nginx.conf or server setup:
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
gzip_min_length 256;
gzip_vary on;
For Brotli (requires the ngx_brotli module):
brotli on;
brotli_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
Apache
Enable mod_deflate and add to your .htaccess or server config:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json text/xml image/svg+xml
</IfModule>
CDN-level compression
If you use Cloudflare, compression is enabled by default. Netlify and Vercel also compress automatically. If you use AWS CloudFront, enable “Compress objects automatically” in your distribution settings.
Platform-specific
WordPress: Most caching plugins (WP Rocket, W3 Total Cache) enable gzip. Check the plugin settings. Shopify: Compression is handled automatically. Squarespace: Compression is handled automatically.
How to verify the fix
Use curl to check the response headers:
curl -sI -H "Accept-Encoding: gzip" https://yoursite.com | grep -i content-encoding
You should see Content-Encoding: gzip or Content-Encoding: br. A SiteCurl scan checks this automatically across all scanned pages.
Related checks
Compression pairs well with browser cache headers and fixing render-blocking resources. All three reduce load time without changing your content.
Start a free trial to check compression and 84 other performance items.
More on speed
See what's slowing your site down
Measure Core Web Vitals, find render-blocking resources, and get a speed fix plan.
Start 7-Day Studio TrialNo credit card required.