↑ ↓ select, Enter open, Esc close

Check whether a website serves gzip or Brotli

Adjust the values, the command updates live
user@server
curl -s -o /dev/null -D - -H "Accept-Encoding: br, gzip" https://example.com/ | grep -i "^content-encoding"

Sends a normal GET request announcing that Brotli and gzip are accepted, discards the content and shows only the Content-Encoding header. If it says br or gzip, compression is active. Empty output means the response is served uncompressed.

Note: Also test a CSS or JS file instead of just the homepage, since compression is often configured only for certain MIME types.

Also searched as

  • check if gzip is enabled
  • test brotli compression curl
  • is my site served compressed
  • pagespeed enable text compression

Related one-liners

All in nginx

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.