Website performance and delivery · Article 0340
How to Diagnose GZIP compression not being applied
Use this evidence-first guide to diagnose the specific symptom, make the smallest justified change, and confirm that the original workflow is restored.
What the symptom usually means
This symptom is a clue, not a diagnosis. For “How to Diagnose GZIP compression not being applied,” the cause may sit in configuration, routing, application behavior, or an upstream service. Confirm the failing layer from the response and logs before changing settings.
Compression checks
- Send a request with Accept-Encoding: br, gzip and inspect the response's Content-Encoding, Vary, and Content-Length/transfer size. Confirm the response is eligible for compression.
- Check whether compression is applied at the origin, reverse proxy, or CDN and avoid configuring conflicting layers that double-compress or strip headers.
- Test HTML, CSS, and JavaScript separately and verify the response body remains valid; do not infer success solely from a control-panel toggle.
Checks to run first
- Reproduce the issue and record URL, timestamp, device/browser, expected and actual results, and recent changes.
- Inspect browser Network/Console tools and application/hosting logs for the first relevant failure.
- Compare with a known-working page, user, device, or request to narrow the difference.
- Change one evidence-supported setting or component at a time and preserve the original value for rollback.
Measure before changing performance settings
Use these checks to isolate the specific failure described in this guide.
Step-by-step troubleshooting
- Request a representative text asset with Accept-Encoding: gzip and inspect whether the response contains Content-Encoding: gzip. Compare the HTML document with CSS and JavaScript because compression can be configured by MIME type.
- Identify whether Apache/Nginx, the application, hosting panel, or CDN owns compression. Check for exclusions, minimum-size thresholds, and proxy behavior that may bypass compression for some paths.
- Enable GZIP for eligible text MIME types at the responsible layer. Avoid compressing already-compressed images and avoid double-compressing content or caching variants without respecting Accept-Encoding.
- Test a fresh response with a gzip-capable client and verify the body decodes, the header matches the encoding, and the response size is reduced.
How to verify the fix
- Confirm eligible text responses negotiate GZIP and decode correctly with Content-Encoding: gzip.
- Test at least one nearby workflow that should remain unaffected.
- Check for a new error in the browser console, application log, or provider dashboard.
- If a cache or DNS TTL is involved, allow the relevant cache/TTL interval and verify from more than one path before concluding that the change failed.
Common mistakes to avoid
- Changing several settings at once, which prevents you from identifying the cause.
- Deleting content, resetting the database, or disabling security controls before evidence justifies that action.
- Using broad permission changes such as making every file writable, or exposing debugging output and secrets to public visitors.
- Assuming the homepage working proves that forms, admin pages, APIs, redirects, and other URLs also work.
- Repeatedly clearing every cache or changing DNS while the underlying origin/configuration is still wrong.
If the problem continues
Escalate with the exact affected URL, timestamp and time zone, response/error code, steps to reproduce, recent changes, and a sanitized log excerpt or request ID. Tell the host or software provider what you tested and what changed. Ask them to check the layer you cannot access rather than requesting a broad reset.
For provider-specific values, version-sensitive behavior, or commands, confirm the instructions in the official documentation for your exact hosting plan and software version before applying them. This guide intentionally avoids destructive one-size-fits-all commands because the correct action depends on the evidence and environment.