In Cloudflare, what do the two DDoS Attack Protection managed rulesets cover, and why can a team tune them but never switch them off?
answer
- layer 7 versus layers 3 and 4
- always enabled, only customised
- action and sensitivity, nothing else
- Essentially Off still has a floor
basics
~20 sHTTP DDoS Attack Protection covers layer-7 floods and Network-layer DDoS Attack Protection covers layer-3/4 floods; both are always on and unmetered on every plan, and a team can only override their action and sensitivity, never remove them.
solid answer
~50 sEvery zone proxied through Cloudflare, on every plan, is covered by two managed rulesets: **HTTP DDoS Attack Protection** (layer 7: known attack tools, botnets, unusual requests, generic request floods, floods that cause origin errors) and **Network-layer DDoS Attack Protection** (layers 3/4: UDP and SYN floods, reflection, DNS floods). Detection runs on traffic samples out of path, fingerprints the attack and installs a short-lived mitigation rule, on average within about three seconds, and attack traffic is excluded from billing. What a team controls is an override: a different action or a lower sensitivity level for the ruleset, a tag or one rule. The HTTP ruleset is always enabled, so an override with `"enabled": false` cannot disable its rules, and even *Essentially Off* still mitigates an attack big enough to threaten Cloudflare's network. On an ordinary proxied zone only the HTTP ruleset is customisable; network-layer overrides are for Enterprise Magic Transit and Spectrum customers.
go deeper
Name both rulesets and their layers, and say they are always on and free on every plan. Knowing that you tune action and sensitivity, not an on/off switch, is the core of the answer.
Explain how sampling, fingerprints and ephemeral mitigation rules work, and why thresholds are per fingerprint. Mention the read-only tag and that only Magic Transit and Spectrum Enterprise customers customise the network-layer ruleset.
Show you know the floor: Essentially Off and Log still mitigate attacks large enough to threaten the network. Argue for keeping defaults and adding custom rules, rate limits and origin lockdown rather than loosening the DDoS rules.
Frame the always-on, unmetered model as a cost decision: DDoS absorption is not a budget line, so the team's spend goes into tuning overrides, alerting and the controls the rulesets do not cover.
## The two managed rulesets Cloudflare exposes its automatic DDoS defence as **managed rulesets**: collections of rules that Cloudflare writes, updates on a regular basis and announces in a changelog. A customer never writes these rules; it can only change how they behave. There are two: | Ruleset | Layer | What its rules match | Who can customise it | |---|---|---|---| | **HTTP DDoS Attack Protection** | 7 (HTTP and HTTPS) | known attack tools and botnets, suspicious or protocol-violating requests, request floods hitting the cache or origin, floods that cause many origin errors | every plan, at zone level (and at account level through the API) | | **Network-layer DDoS Attack Protection** | 3 and 4 | UDP floods, SYN floods, SYN-ACK reflection, DNS floods and other packet-level vectors | only Magic Transit and Spectrum customers on an Enterprise plan | Both run for every zone onboarded to Cloudflare, on Free, Pro, Business and Enterprise alike. Because the CDN and WAF service works at layer 7, a proxied web zone is protected against HTTP floods and against the layer-3/4 attacks beneath them. ## How detection and mitigation work The mechanism matters because it explains why there is no on/off switch and no published threshold: - **Out-of-path sampling.** A detection daemon runs on every server in every data centre and analyses samples of packets and HTTP request metadata (headers, user agent, path, method, TLS details, request rate) plus origin response codes, so detection adds no latency. - **Rules with built-in confidence.** Each rule ships with a predefined sensitivity level and a default action chosen by how confident the rule is that matching traffic is an attack. High-confidence rules block; lower-confidence ones challenge, close connections or rate-limit. - **A live fingerprint.** When traffic matches a rule, the system builds a real-time signature from whichever attributes are strong indicators. For a widely distributed attack the source IP is a weak indicator, so it is left out of the signature. - **Ephemeral mitigation rules.** The fingerprint is installed as a mitigation rule and expires shortly after matching traffic stops. Detection and mitigation take up to about three seconds on average. - **Thresholds per fingerprint.** Thresholds vary per rule, globally and per data centre, and apply per fingerprint, so Cloudflare does not publish numbers; it offers the sensitivity adjustment instead. ## What "you can only customise it" means The HTTP ruleset documentation says it plainly: the ruleset is always enabled and you can only customise its behaviour. In practice: 1. You deploy an **override** in the `ddos_l7` phase that changes the **action** (Block, Managed Challenge, Interactive Challenge, or Log on Enterprise) or the **sensitivity level** (High, Medium, Low, Essentially Off). 2. An override with `"enabled": false` cannot disable the rules, unlike an ordinary managed ruleset rule. 3. Some rules carry the `read-only` tag and cannot have their action or sensitivity overridden at all; a false positive on one goes to Cloudflare Support. 4. *Essentially Off* is an exceptionally low sensitivity, not an off switch: if an attack is extremely large, Cloudflare still triggers the rule's mitigation to protect its own network. The same floor applies to *Log*. ## Unmetered by design Since 2017 Cloudflare has offered DDoS protection that is free, unmetered and unlimited: no cap on the number, duration or size of attacks, and the billing systems exclude DDoS attack traffic from usage. That is the business reason the rulesets cannot be turned off: protection is part of the network, not an optional product a customer pays for per gigabyte. ## What the rulesets leave to other controls The DDoS rulesets mitigate traffic that looks like a flood. They do not: - enforce a per-client request budget on a login endpoint, which is what rate limiting rules are for; - block a specific path, country or network by policy, which is a WAF custom rule; - protect an origin whose IP address attackers already know and hit directly, which needs the origin locked to Cloudflare. Cloudflare's own proactive-defence guidance asks every customer to keep the DDoS rulesets at their defaults (High sensitivity, default actions) and add those other controls on top, rather than loosening the DDoS rules and hoping the rest catches up.
- Why does Cloudflare not publish the request-per-second thresholds of its HTTP DDoS rules?Thresholds differ per rule, globally and per data centre, and apply per attack fingerprint, so you cannot know in advance which rule, location or fingerprint your traffic will produce. A number would mislead. Instead Cloudflare offers sensitivity levels: lower the level to raise the threshold, and on Enterprise use Log to find the level where a rule stops matching legitimate traffic.
- Does a zone pay for the bandwidth of a DDoS attack that Cloudflare absorbed?No. Cloudflare's DDoS protection has been unmetered since 2017: there is no limit on attack size, duration or count, and billing excludes attack traffic. The exception is architectural: if another CDN sits in front of Cloudflare, that first provider still bills for the attack traffic it carried before Cloudflare mitigated it.
- Turning DDoS protection off for a zone with an override that sets enabled to false.
- Believing Essentially Off removes a rule from evaluation completely.
- Saying DDoS mitigation on Cloudflare is a paid add-on billed per attack gigabyte.
- Expecting a Pro zone to tune the Network-layer ruleset the way it tunes the HTTP one.
- Asking Cloudflare for each rule's exact requests-per-second threshold before tuning.