# How to block bots with Cloudflare

> Cloudflare has bot controls on every plan. Free plans get Bot Fight Mode, Pro, Business and Enterprise get Super Bot Fight Mode, and Enterprise customers can add Bot Management, which gives every request a bot score. WAF custom rules, rate limiting rules and Turnstile protect specific pages. You still have to tune the rules and decide what each score means on each endpoint.

Category: Blocking bots in practice. Level: Intermediate. Updated: 2026-11-24.
Canonical page: https://stopbots.io/learn/implementation/block-bots-with-cloudflare/

Cloudflare's bot features depend on your plan, and Cloudflare renames and moves them often. Check the [Cloudflare bots documentation](https://developers.cloudflare.com/bots/) for your plan before you rely on a specific feature.

## What do Bot Fight Mode and Super Bot Fight Mode do?

[Bot Fight Mode](https://developers.cloudflare.com/bots/get-started/bot-fight-mode/) is the free option. It spots requests that match known bot patterns and answers them with computationally expensive challenges. Know its limits before you turn it on: it covers the whole domain, WAF custom rules cannot skip it, and Cloudflare warns that it may challenge API and mobile app traffic.

[Super Bot Fight Mode](https://developers.cloudflare.com/bots/get-started/super-bot-fight-mode/) is for Pro, Business and Enterprise plans (Enterprise accounts without the Bot Management add-on get the Business feature set). You set one action per group: definitely automated traffic (bot score 1) on Pro and above, likely automated traffic (scores 2 to 29) on Business and above, and verified bots such as search engine crawlers. It adds static resource protection and JavaScript detections, and you can exclude paths with a custom rule that uses the Skip action.

Cloudflare suggests starting login protection with Managed Challenge for definitely automated and (on Business) likely automated traffic, and Allow for verified bots. Review Security Events for a few days, then switch definitely automated traffic to Block if no real users show up there.

## How do bot scores work in Cloudflare Bot Management?

Bot Management is an add-on for Enterprise plans. It gives every request a [bot score](https://developers.cloudflare.com/bots/concepts/bot-score/) from 1 to 99: 1 means Cloudflare is confident the request is automated, 2 to 29 is likely automated, and 30 to 99 is likely human. A score of 0 means no score was computed, which does not make the request safe.

Bot Management blocks nothing by itself. You write custom rules that use the score, along with fields such as JA3 and JA4 TLS fingerprints, detection IDs and the verified bot flag. A starting policy to adapt:

- Login, signup and checkout: Managed Challenge below 30, Block at 1.
- Product and content pages: log low scores first, then rate limit them.
- APIs used by your mobile app: no challenge; use rate limits and app attestation.

Scores can shift when Cloudflare retrains its model, so review score-based rules on a schedule.

## Which WAF custom rules block bots?

[WAF custom rules](https://developers.cloudflare.com/waf/custom-rules/) take expressions in the Cloudflare Rules language. The fields that matter most for bots are `http.user_agent`, `http.request.uri.path`, `http.request.method`, `ip.src.asnum` (the client's network; older rules use the deprecated name `ip.geoip.asnum`), `cf.client.bot` (true for verified good bots, the same value as `cf.bot_management.verified_bot`) and, with Bot Management only, `cf.bot_management.score`. The [fields reference](https://developers.cloudflare.com/ruleset-engine/rules-language/fields/reference/) lists the rest.

Challenge login and signup posts that are not from verified bots (action: Managed Challenge):

```txt
(http.request.uri.path in {"/login" "/signup"} and http.request.method eq "POST" and not cf.client.bot)
```

Block form posts with an empty user agent or a common scripting library (action: Block). It only stops bots that admit what they are:

```txt
(http.request.method eq "POST" and (http.user_agent eq "" or lower(http.user_agent) contains "python-requests"))
```

Challenge sensitive paths from hosting networks you see in your logs (action: Managed Challenge), replacing the placeholder ASNs with the networks attacking you:

```txt
(ip.src.asnum in {64496 64497} and http.request.uri.path in {"/login" "/checkout"} and not cf.client.bot)
```

With Bot Management, one score rule can replace many hand-made lists:

```txt
(cf.bot_management.score lt 30 and not cf.bot_management.verified_bot and not cf.bot_management.static_resource)
```

With the Managed Challenge action, Cloudflare picks the kind of check per visitor, from non-interactive to interactive. Challenge pages are full HTML pages, so they fail on `fetch` or XHR requests, such as a login form in a single-page app. For those, Cloudflare recommends Turnstile pre-clearance, described in its [challenge pages docs](https://developers.cloudflare.com/cloudflare-challenges/challenge-types/challenge-pages/).

## Rate limiting rules, Turnstile and AI crawler controls

[Rate limiting rules](https://developers.cloudflare.com/waf/rate-limiting-rules/) cap requests per client on a path. Free and Pro plans count by IP address only. Business and above can count failed logins alone by matching the response code, and the Enterprise Advanced Rate Limiting option counts by header, cookie, ASN or JA4 fingerprint. The [rate limiting guide](https://stopbots.io/learn/implementation/are-rate-limits-enough-to-stop-bots.md) explains what IP-based limits miss.

[Turnstile](https://developers.cloudflare.com/turnstile/) is Cloudflare's CAPTCHA alternative for forms, and it works on sites not proxied through Cloudflare too. The widget issues a token that your server must validate with the Siteverify API, or it protects nothing. [reCAPTCHA vs hCaptcha vs Turnstile](https://stopbots.io/learn/captcha/recaptcha-vs-hcaptcha-vs-turnstile.md) compares the options.

For AI crawlers, every plan has a managed setting that blocks known AI bots, grouped by what they do (search, agent or training) with an action per group. See the [AI crawler and agent access docs](https://developers.cloudflare.com/bots/additional-configurations/block-ai-bots/) and our guide on [how to block AI crawlers](https://stopbots.io/learn/scraping/how-to-block-ai-crawlers.md).

## What does Cloudflare not do for you?

Rule tuning is your job. Start new rules with Managed Challenge and measure how many real users you catch before you block; [false positives in bot detection](https://stopbots.io/learn/detection/bot-detection-false-positives.md) covers how. The same applies to scores: a score that is fine on a blog post can be too risky on a gift card checkout, and only you can set that policy.

Logged-in abuse is mostly outside its view. Multi-accounting, promo abuse and fake account farms often pass bot checks because a person or a real browser does the work. Stopping them needs account-level signals such as devices shared between accounts, account age, payment details and addresses. Cloudflare offers some account abuse detections to Enterprise Bot Management customers, but most of the data that links accounts sits in your own systems; see [how to detect multi-accounting](https://stopbots.io/learn/fake-accounts/how-to-detect-multi-accounting.md).

Bots that reach your origin directly skip Cloudflare entirely. If your server's IP address is known, configure the origin to accept traffic only from Cloudflare.

## Tools that help

_StopBots is published by Kairal, which is one of the tools listed. The list is not a ranking._
- [Cloudflare Bot Management](https://www.cloudflare.com/application-services/products/bot-management/) gives per-request bot scores on Enterprise plans; the free and Pro bot settings are enough for many small sites.
- [Cloudflare Turnstile](https://www.cloudflare.com/application-services/products/turnstile/) is a free challenge for forms that works with or without the Cloudflare proxy.
- [CrowdSec](https://www.crowdsec.net/) is open source and can push its blocklist decisions to Cloudflare, adding community IP reputation to a free plan.
- [Kairal](https://www.kairal.io/integrations/) works alongside Cloudflare and links device, network and behavioural signals across login, signup and checkout, which helps with account-level abuse that edge rules miss.

## Common questions

### Can Cloudflare stop bots?

It stops many automated requests at the edge, especially from simple scripts, hosting networks and known bad bots. Bots that drive real browsers through residential proxies, and people abusing accounts with light automation, need tuned rules and signals from your own application.

### Is Cloudflare bot protection free?

Bot Fight Mode, the AI crawler controls, Turnstile and a basic rate limiting rule are available on the Free plan. Super Bot Fight Mode needs Pro or a higher plan, and per-request bot scores need the Bot Management add-on for Enterprise plans.

### Why is Cloudflare bot protection blocking my API or mobile app?

Bot Fight Mode applies to the whole domain and cannot be skipped with custom rules, so it can challenge API clients and mobile apps that cannot run a challenge. Super Bot Fight Mode on Pro and above lets you exclude paths with a custom rule that uses the Skip action.

### What is the difference between Cloudflare Bot Management and Turnstile?

Bot Management scores every request at the edge without the visitor doing anything. Turnstile is a widget you place on a page, usually on a form, that issues a token your server must check. Many sites use Turnstile on forms and bot settings or scores everywhere else.

## Related

- [How to block AI crawlers: robots.txt, Cloudflare and nginx](https://stopbots.io/learn/scraping/how-to-block-ai-crawlers.md)
- [WAF vs bot management: what is the difference?](https://stopbots.io/learn/implementation/waf-vs-bot-management.md)
- [reCAPTCHA vs hCaptcha vs Cloudflare Turnstile](https://stopbots.io/learn/captcha/recaptcha-vs-hcaptcha-vs-turnstile.md)
- [How to stop bots on your website](https://stopbots.io/learn/implementation/how-to-stop-bots-on-your-website.md)
