skip to content

In Cloudflare Bot Management, what does a bot score from 1 to 99 mean, and how do you act on cf.bot_management.score in a rule?

level: middleimportance: must knowfreq 42%

answer

  1. low means automated, high human
  2. 1, then 2-29, then 30-99
  3. zero is not computed
  4. skip verified bots before scoring

basics

~20 s

The bot score is Cloudflare's confidence that a request is automated: 1 almost certainly a bot, 2-29 likely automated, 30-99 likely human, 0 not scored. Enterprise Bot Management exposes it as cf.bot_management.score for custom rules, Workers and logs.

solid answer

~40 s

Every request to a Bot Management zone gets a **bot score** from 1 to 99: 1 means Cloudflare is quite certain it is automated (usually a heuristics match), 2-29 is *likely automated*, 30-99 *likely human*, and 0 means Bot Management never evaluated the request, which says nothing about safety. Machine learning produces most scores, anomaly detection and JavaScript detections add signals, and the `__cf_bm` cookie smooths a visitor's scores across a session. With the Enterprise add-on the score is `cf.bot_management.score` in WAF custom rules, `request.cf.botManagement.score` in a Worker and `BotScore` in logs. A sensible baseline: skip requests where `cf.bot_management.verified_bot` is true, block `score eq 1`, send 2-29 to a Managed Challenge, and tighten only on paths such as checkout, excluding `cf.bot_management.static_resource`.

code

plaintext · 8 lines
plaintext
Rule 1 - action Skip (all remaining custom rules)
(cf.bot_management.verified_bot)

Rule 2 - action Block
(cf.bot_management.score eq 1)

Rule 3 - action Managed Challenge
(starts_with(http.request.uri.path, "/checkout") and cf.bot_management.score gt 1 and cf.bot_management.score lt 30 and not cf.bot_management.static_resource)

go deeper

for a junior

Recall the direction and the bands: 1 automated, 2-29 likely automated, 30-99 likely human, 0 not computed, and that only the Enterprise add-on exposes the number.

for a middle

Explain the engines behind the number, why a missing User-Agent scores 1, and how the field appears in custom rules, Workers and logs.

for a senior

Show a rollout that survives real traffic: verified bots exempted first, Managed Challenge for the middle band, static resources excluded, thresholds tuned from BotScore in logs.

for a principal

Weigh where friction is worth it: which paths justify a tighter threshold, what a challenged buyer costs against a scalped ticket, and who owns the thresholds once they are live.

## What the score measures A **bot score** is Cloudflare's estimate, from 1 to 99, of how likely it is that a request came from a bot. Low means automated, high means human. It measures **automation, not intent**: a search engine crawler, a price-tracking script and a ticket-buying bot are all automated and can all score low. Whether an automated client is welcome is a separate question, answered by verified-bot status and by your own rules. Granular scores are an Enterprise feature: only zones with the **Bot Management** add-on can read the per-request number. Pro and higher plans see their traffic in **bot groupings** in Bot Analytics, and Super Bot Fight Mode acts on those fixed groupings. ## The ranges | Score | Grouping | Typical source | Typical treatment | | --- | --- | --- | --- | | 0 | Not computed | Request handled before Bot Management ran, such as by a Redirect Rule, or an internal service request | None; 0 is not a sign of a human | | 1 | Automated | Heuristics: a known malicious fingerprint, or a missing `User-Agent` | Block, after verified bots are exempted | | 2-29 | Likely automated | Mostly machine learning; heuristics sometimes set 29 | Managed Challenge | | 30-99 | Likely human | Machine learning | Allow | ## How Cloudflare computes it Several detection engines feed the score on Bot Management zones: - **Heuristics** match requests against known malicious fingerprints and give high-confidence detections a 1. A request with a missing or empty `User-Agent` header gets a 1 at once, a common false positive behind corporate proxies that strip the header; `cf.bot_management.corporate_proxy` or an IP allowlist can exempt that traffic. - **Machine learning** analyses request features across Cloudflare's traffic and produces most scores between 2 and 99. Cloudflare encourages turning on auto-updates to the machine learning model. - **Anomaly detection** compares traffic with a baseline learned for your own site. - **JavaScript detections** catch headless browsers and other automation tools that cannot run the injected script. The **`__cf_bm` cookie** measures a single visitor's request pattern so that one odd request does not swing a real user's score, reducing false positives across a session. ## Where you can use it - **WAF custom rules**: `cf.bot_management.score` is a number, compared with `eq`, `lt`, `le`, `gt` and `ge`, and usually combined with `cf.bot_management.verified_bot` and `cf.bot_management.static_resource`. - **Workers**: `request.cf.botManagement.score`, alongside `verifiedBot` and `staticResource`, for decisions in code such as serving cached prices to low-scoring clients. - **Logs**: the `BotScore` and `BotScoreSrc` fields of HTTP request logs show each score and the engine that produced it, which is how you tune thresholds. ## A baseline for a ticket marketplace Cloudflare's suggested starting rules, in order: 1. **Skip verified bots**: `(cf.bot_management.verified_bot)` with *Skip* for all remaining custom rules, so crawlers and monitoring services are never scored out. 2. **Block definitely automated**: `(cf.bot_management.score eq 1)`. False positives are rare at 1. 3. **Challenge likely automated**: `(cf.bot_management.score gt 1 and cf.bot_management.score lt 30)` with *Managed Challenge*, so the occasional human who lands in that band can still pass. Then tighten where abuse costs money. Automated buyers hit checkout, so a stricter rule can cover only that path while the public catalogue stays relaxed. Static resources are included by default when a rule uses the score, so add `not cf.bot_management.static_resource` to keep images and scripts from being challenged. Before enforcing a new threshold, review Bot Analytics and Security Events and start with a small scope. A challenge shown to a real fan at checkout is a lost sale, so thresholds move with evidence, not guesses. ## Mistakes that show up in review - **Reading the score as intent.** A low score says automated; whether that automation is welcome is decided by verified-bot status and by your own exceptions. - **One threshold for the whole zone.** The catalogue, the API and checkout carry different risks, and a single cut-off either lets scalpers through or challenges the API's own clients. - **Treating 0 as a pass or a fail.** Zero means scoring did not run for that request, often because another rule handled it first; look at why before writing rules around it. - **Blocking the middle band outright.** Scores 2-29 contain some real visitors, which is why Cloudflare's baseline challenges that band rather than blocking it.

  • Why might every employee of one corporate customer get a Cloudflare bot score of 1?
    Requests with a missing or empty `User-Agent` header are scored 1 by the Heuristics engine, and some corporate proxies and secure web gateways strip that header. Check the requests in Security Events; exempt the traffic with `cf.bot_management.corporate_proxy`, which flags known cloud-based corporate proxies, or with an IP allowlist for that customer's egress addresses.
  • Why is a bot score of 0 not a reason to let a request through?
    Zero means Bot Management never evaluated the request: it was an internal Cloudflare service request, or another feature such as a Redirect Rule handled it first. The score carries no judgment either way, so a rule should neither treat 0 as human nor as a bot; it should notice that scoring did not run for that path.

  • A bot score of 99 means Cloudflare is sure the request is malicious.
  • A bot score of 0 means the request is human and safe.
  • Search crawlers score high because they are good bots.
  • Any Pro plan can write custom rules on cf.bot_management.score.
  • Block everything below 30, static resources included, from day one.