---
title: Disable Brotli compression · Cloudflare Rules docs
description: Create a compression rule to turn off Brotli compression for all incoming requests of a given zone.
source_url:
  html: https://eba81114.preview.developers.cloudflare.com/rules/compression-rules/examples/disable-all-brotli/index.md
  md: https://eba81114.preview.developers.cloudflare.com/rules/compression-rules/examples/disable-all-brotli/
---

* Dashboard

  The following example rule will disable Brotli compression for all incoming requests of a given zone. The only available compression algorithm will be Gzip.

  **When incoming requests match**

  * All incoming requests

  **Then**

  * **Compression options**: Custom
  * **Define a custom order for compression types**: `Gzip`

  If the client does not support Gzip compression, the response will be uncompressed.

* API

  The following example sets the rules of an existing [entry point ruleset](https://developers.cloudflare.com/ruleset-engine/about/rulesets/#entry-point-ruleset) (with ID `{ruleset_id}`) for the `http_response_compression` phase to a single compression rule, using the [Update a zone ruleset](https://developers.cloudflare.com/api/resources/rulesets/methods/update/) operation:

  ```bash
  curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets/$RULESET_ID" \
    --request PUT \
    --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    --json '{
      "rules": [
          {
              "expression": "true",
              "action": "compress_response",
              "action_parameters": {
                  "algorithms": [
                      {
                          "name": "gzip"
                      }
                  ]
              }
          }
      ]
    }'
  ```
