Skip to content
Nazmul Nikhil
Menu

Not Compressed (Ahrefs): How to Turn On Gzip or Brotli

Ahrefs flags pages served without compression. Turning on gzip or Brotli shrinks HTML for faster loads. Here's how on cPanel, Apache, nginx and major platforms.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 2 min read
Not Compressed (Ahrefs): How to Turn On Gzip or Brotli
Photo: suraj kardile on Unsplash

In short

Ahrefs flags "Not compressed" when a page's HTML is sent without compression, meaning the server response has no Content-Encoding header such as gzip or br (Brotli). Turning compression on usually cuts HTML transfer size by well over half, so pages arrive faster. On most hosts it's a single setting or a few lines of server configuration.

Compression is one of the easiest speed wins on the web. Text files like HTML shrink a lot when compressed, and every modern browser can unpack them.

How to check

Open DevTools > Network, reload the page, click the document row, and look at Response Headers. You want to see content-encoding: gzip or content-encoding: br. You can also check from the command line:

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

How to fix it

cPanel hosting: open cPanel > Software > Optimize Website, choose "Compress all content", and save. Many cPanel hosts run LiteSpeed, which also compresses through its own settings.

Apache (.htaccess):

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml application/javascript application/json application/xml image/svg+xml
</IfModule>

nginx:

gzip on;
gzip_types text/plain text/css application/javascript application/json application/xml image/svg+xml;

(nginx compresses text/html by default once gzip is on.)

Node.js (Express): use the compression middleware, or let a proxy or CDN in front of the app compress responses.

WordPress: compression is a server setting, not a WordPress one. Use the cPanel option above, or a caching plugin that writes the rules for you.

Shopify, Webflow and Wix: compression is handled by the platform's CDN. If Ahrefs flags these sites, recheck the headers in your browser. The flag is usually caused by something in front of the site, such as a misconfigured proxy.

CDN users (Cloudflare and similar): most CDNs compress automatically. Check that the CDN isn't caching an uncompressed copy from your origin.

Common mistakes

  • Compressing images and PDFs again. JPEG, PNG, WebP and PDF are already compressed. Only compress text formats.

  • Turning on compression in two places (server and plugin), which can cause errors or broken pages.

This guide isn't affiliated with or endorsed by Ahrefs.

Sources and references

TAGSAhrefs Site AuditPage not compressedEnable gzip compressionBrotli compression
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com