Skip to content

Configure payload logging

Use an account-level public key as your default payload logging configuration. This key captures supported matches from Managed Rules and Custom Rules for every zone in the account.

Add a zone-level key only when a zone needs a different key. Cloudflare treats the zone-level key as an override for that zone.

Choose a configuration scope

Choose a scope based on the rules you want to cover:

Scope Rule coverage Use case
Account default Managed Rules and Custom Rules in every zone without an override Use one key across the account
Zone override Managed Rules and Custom Rules in one zone Use a different key for one zone
Managed ruleset (legacy) Only the rules in one managed ruleset Maintain an existing ruleset-level configuration

If you need payload logging for Custom Rules, configure an account default or zone override. Managed ruleset keys apply only to Managed Rules and are a legacy configuration.

Key precedence

When multiple keys apply, Cloudflare selects the zone override first, the account default second, and the managed ruleset key third.

Adding an account default or zone override does not delete managed ruleset keys. A managed ruleset key becomes effective again if no account or zone key applies.

To migrate, reuse the existing key pair at the account or zone level. After verifying the new configuration with the existing private key, delete the managed ruleset key.

Choose a configuration method

You can configure account and zone keys in either the dashboard or API:

To migrate or maintain an existing managed ruleset key, refer to Legacy Managed Rules payload logging.

Was this helpful?