INTEGRITY Cloudflare Docs

Security features interoperability

Cloudflare applies multiple security features to every incoming request. Each feature runs at a specific stage, and the order determines which feature acts first. Understanding this order helps you avoid conflicts and reduce false positives.

Execution order

Cloudflare security features powered by the Ruleset Engine run in a fixed sequence of phases. When a request arrives, it passes through each phase in order. If a rule takes a terminating action (for example, Block or Managed Challenge), the request stops and does not reach later phases.

The security-related request phases, in execution order, are:

Phase name Product
ddos_l7 HTTP DDoS Attack Protection
http_request_firewall_custom Custom rules
http_ratelimit Rate limiting rules
http_request_firewall_managed Managed Rules
http_request_sbfm Super Bot Fight Mode

Within each phase, account-level rulesets run before zone-level rulesets.

The Ruleset Engine powers many Cloudflare products beyond security. Refer to Phases list for the complete list of request and response phases.

Features outside the Ruleset Engine

The following security features are not powered by the Ruleset Engine and are evaluated independently:

Because these features run independently, they do not follow the phase order described above.

Security features overview

DDoS protection

DDoS protection is always on for all Cloudflare plans. L7 HTTP DDoS Attack Protection detects and mitigates application-layer DDoS attacks. L3/4 Network-layer DDoS Attack Protection handles network-layer attacks. You do not need to turn on or configure anything for DDoS protection to work.

Custom rules

Custom rules are rules you define. They run in the http_request_firewall_custom phase and support actions like Block, Managed Challenge, Skip, and Log. You can reference bot score fields, WAF attack score fields, and all standard request fields in your expressions.

Rate limiting rules

Rate limiting rules throttle or block traffic that exceeds a defined request rate. They run in the http_ratelimit phase, after custom rules.

Managed Rules

Managed Rules are pre-configured rulesets maintained by Cloudflare. These include the Cloudflare Managed Ruleset and the OWASP Core Ruleset. They run in the http_request_firewall_managed phase.

Bot Fight Mode

Bot Fight Mode is available on Free plans. It is a simple on/off toggle that challenges traffic matching patterns of known bots. You cannot customize its behavior or skip it with custom rules.

Super Bot Fight Mode

Super Bot Fight Mode (SBFM) is available on Pro, Business, and Enterprise plans (without the Bot Management add-on). It runs in the http_request_sbfm phase and offers more control than Bot Fight Mode. You can configure separate actions for Definitely automated, Likely automated, and Verified bots traffic. You can skip SBFM for specific requests using the Skip action in custom rules.

Bot Management

Bot Management is an Enterprise add-on. It generates a bot score from 1 to 99 for every request. Lower scores indicate more automated traffic. You write custom rules using the cf.bot_management.score field to take action based on this score. For more information, refer to Bot Management variables.

Key interaction rules

These rules govern how security features interact:

Common scenarios

Small business website (Free plan)

A Free plan includes DDoS protection and Bot Fight Mode.

Because Bot Fight Mode cannot be skipped or customized, you cannot create exceptions for specific bots. If Bot Fight Mode causes false positives for legitimate automated traffic (for example, monitoring services or payment processors), consider upgrading to a Pro or Business plan that includes Super Bot Fight Mode.

E-commerce site (Pro or Business plan)

A Pro or Business plan adds Super Bot Fight Mode, custom rules, and Managed Rules.

Enterprise API and website (Enterprise plan)

An Enterprise plan with the Bot Management add-on provides the most flexibility.

Troubleshoot conflicts

When security features interfere with legitimate traffic, use the following steps to identify and resolve the issue.

Identify which feature blocked a request

Use Security Events to identify the feature that blocked a request:

  1. In the Cloudflare dashboard, go to the Analytics page.

    Go to Analytics ↗
  2. Select the Events tab.

  3. Find the blocked request in the log.

  4. Check the Service field to determine which product took the action. This field tells you which feature to adjust.

Resolve Bot Fight Mode false positives

Bot Fight Mode does not support exceptions. You have two options:

For more information, refer to Handle false positives from Bot Fight Mode or Super Bot Fight Mode.

Resolve Super Bot Fight Mode false positives

Create a custom rule with the Skip action to bypass SBFM for the affected traffic:

  1. In the Cloudflare dashboard, go to the Security rules page.

    Go to Security rules ↗
  2. Select Create rule > Custom rules.

  3. Define an expression that matches the legitimate traffic (for example, a specific IP range or user agent).

  4. Set the action to Skip and select Super Bot Fight Mode.

For more information, refer to Handle false positives from Bot Fight Mode or Super Bot Fight Mode.

Resolve Managed Rules false positives

If a managed rule blocks legitimate traffic:

For detailed guidance, refer to Troubleshoot managed rules.