Performance
Compression shrinks text-based responses (HTML, CSS, JavaScript, JSON) before they're sent, so pages download faster.
Not sure whether your site has this problem? Check it in seconds.
Smaller responses mean less data over the network, which helps most on slow connections. Already-compressed files such as JPEG, PNG, WebP and video shouldn't be compressed again.
In DevTools → Network, click the main document and look for Content-Encoding: gzip or br in the response headers.
Nginx (gzip)
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_vary on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml image/svg+xml;Apache
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json application/javascript text/xml application/xml image/svg+xmlBrotli usually compresses smaller; gzip is universally supported. Serving Brotli with a gzip fallback is common.
Guidance is general. Test header and DNS changes on a staging copy first, and check your hosting provider's documentation for platform-specific steps.