Troubleshooting guide · cloudflare · Published 2026-08-16 · 3 min read

Cloudflare Security Level explained

How Cloudflare Security Level works, the default Medium setting, the retired threat score, when to use I'm Under Attack, and how to scope it with a configuration rule.

Flat editorial illustration showing a planetary shield with concentric orbit rings, one radial segment glowing as a small request dot climbs.
Illustration: this article at a glance.

What Security Level does

The Security Level decides how aggressively Cloudflare presents a challenge to a visitor whose traffic it considers suspicious. It is a blunt, reputation-based filter applied to the whole zone unless a rule narrows it. The setting lives under Security > Settings, exposes the strings essentially_off, low, medium, high and under_attack, and defaults to medium.

The levels and their intent

The threat score retcon

Enough older material cites a threat-score threshold per level (such as medium challenging scores above 14) that it is worth being precise: the score behind those numbers is legacy. Cloudflare's current documentation states that the threat score is always reported as 0 and that rules built on it are no longer recommended. The levels still describe behavioural tiers in the dashboard, but the reproducible, machine-checkable signal you can build a rule on is not the old score. For that you use explicit controls: the managed rulesets, custom WAF rules, or rate limiting, which match on conditions you can see and test rather than an internal reputation number.

Scoping I'm Under Attack correctly

Because Under Attack challenges all traffic, leaving it on globally for normal operation makes automated consumers your API depends on (see client origins) hit challenges and fail. The recommended pattern:

  1. Enable Under Attack only while the attack is active.
  2. Scope it with a configuration rule to the paths under attack (for example example.com/api/*), not the whole zone, when only that surface is targeted.
  3. Off elsewhere, keep rate limiting handling abuse without the full interstitial.
  4. When the attack subsides, lower to medium or add precise WAF rules and monitor the events log.

Decision summary

The Security Level is a useful first line, not a place to encode sophisticated policy. Keep it at a sane default and put your real, testable filtering in WAF rules and rate limiting, which respond to events you can see instead of a score that no longer moves.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services