Sign In Sign Up

Cases

cf_clearance and __cf_bm: How Cloudflare Cookies Work

cf_clearance and __cf_bm explained: what these Cloudflare cookies store, how long they last, and why automated sessions can be re-challenged after an IP change.

Team Froxy 18 Nov 2026 9 min read
cf_clearance and __cf_bm: How Cloudflare Cookies Work

TL;DR:

  • Distinct Cookie Roles: cf_clearance proves a visitor passed a challenge and lasts for a configured period (30 minutes by default), whereas __cf_bm is not a clearance pass and merely stores encrypted behavioral telemetry for bot-score calculations, expiring after 30 minutes of inactivity.
  • Context & Fingerprint Binding: cf_clearance is strictly tied to the originating client environment; altering the exit IP, User-Agent, or TLS fingerprint (JA3/JA4) immediately invalidates trust and triggers a re-challenge regardless of cookie presence.
  • Mid-Session Revocation via Precursor: On Enterprise plans, Precursor monitors request patterns continuously and can revoke or downgrade active clearance in real time before the Challenge Passage timer expires.
  • Tiered Clearance Levels: Verification operates hierarchically (Interactive > Managed > Non-Interactive), meaning a background non-interactive pass will not grant access to endpoints requiring interactive human verification.
  • Session Stability and 403 Diagnostics: Effective automation requires sticky proxies to maintain IP continuity per session, while checking for the cf-mitigated: challenge header on HTTP 403 responses distinguishes solvable challenges from outright blocks or origin-side errors.

An automated session can pass a Cloudflare check, work normally for several requests, and then face another Cloudflare Challenge or a 403. That does not necessarily mean the browser lost its cookies. Cloudflare evaluates the wider session: challenge state, browser characteristics, request behavior, and network context can all matter.

The two most confusing cookies have different jobs. One records challenge clearance after successful client-side verification; the other supports bot detection and scoring. Since July 2026, sites on Cloudflare Enterprise Bot Management can also enable Precursor, a session-level system that can reassess clearance while a session is still active. This article explains how the two cookies work, how long they last, and why a previously accepted session can be checked again.

What Cloudflare Cookies Are and Why Sites Use Them

Cloudflare cookies support security and infrastructure functions such as challenges, bot detection, rate limiting, load balancing, and session continuity. They are not interchangeable: one cookie can preserve challenge state, another can help distinguish visitors behind a shared IP, and another can keep requests on the same origin server. Cloudflare describes the cookies in its reference documentation as necessary for the services that use them.

For developers, the practical lesson is simple: seeing a Cloudflare cookie in a response does not tell you that every security check has been passed. The cookie name must be interpreted in the context of the Cloudflare product that set it.

cf_clearance Cookie: Proof of a Passed Cloudflare Challenge

cf_clearance Cookie

The cf_clearance cookie proves that a visitor passed Cloudflare client-side verification and received challenge clearance. Cloudflare evaluates that state on later requests, but the result is not permanent: Challenge Passage is time-bound, and Precursor can re-evaluate session behavior before the configured period ends.

Cloudflare's current model combines challenge clearance, granted after a successful check, with Precursor clearance, which can be updated as the session develops. That is why a browser may still hold a cf_clearance cookie while the visitor is asked to verify again.

Which Challenges Issue cf_clearance

Challenge Pages normally issue the clearance cookie after a successful solve. Cloudflare Turnstile normally returns a token, but when pre-clearance is enabled it can additionally issue the cookie for the configured zone. A Cloudflare managed challenge can select an appropriate verification method dynamically, while JavaScript Detections store their results in the same cookie. On zones that enable Precursor, it supersedes JavaScript Detections and keeps updating the clearance state throughout the session. For readers familiar with the older term Cloudflare JS challenge, verification now sits inside a broader challenge and session-evaluation model.

The important point is that clearance has levels rather than one universal pass:

Clearance level

Challenges covered while clearance is valid

Interactive

Interactive, Managed, and Non-Interactive

Managed

Managed and Non-Interactive

Non-Interactive

Non-Interactive only

Turnstile pre-clearance

Interactive, Managed, or Non-Interactive, as configured for the widget

A visitor who passed a lower-level check can still meet a higher-level one later. Cloudflare documents Interactive, Managed, and Non-Interactive levels, with higher clearance covering the lower levels.

Challenge Passage: How Long cf_clearance Lasts

Cloudflare sets the default Challenge Passage to 30 minutes and recommends configuring it between 15 and 45 minutes. The site owner can change the value, so the same cookie name does not imply the same lifetime on every domain. Cloudflare also adds a few extra minutes for clock skew during validation, and an extra hour for XMLHttpRequest calls, so that a short Challenge Passage does not break background requests. Challenge Passage does not apply to rate limiting rules, so a request with valid clearance can still hit a rate limit.

That timer applies to challenge clearance. Precursor in Armed mode adds continuous session evaluation and can reduce or invalidate effective clearance earlier if the session becomes suspicious. In other words, the cf clearance model is both time-based and behavior-based.

What cf_clearance Is Tied To

A cf_clearance cookie is tied to the visitor and device for which it was issued, so copying its value to another machine does not create an equivalent session. Cloudflare explicitly describes this binding as protection against reuse across machines.

Other Cloudflare systems can also consider request features, session characteristics, browser signals, and TLS-client fingerprints such as JA3 or JA4. A change in IP, User-Agent, browser profile, or transport characteristics can therefore lead to a fresh security evaluation even when the browser still contains earlier state.

For background, see Froxy's guide to browser fingerprinting.

SameSite, Partitioned, CHIPS, and HTTPS

Cloudflare documents the clearance cookie with SameSite=None; Secure and Partitioned. The last attribute follows the CHIPS model: in third-party contexts, browser storage is partitioned by the top-level site rather than shared freely across unrelated sites.

Because Secure requires HTTPS, Cloudflare warns that if any part of a site uses HTTP, the clearance cookie falls back to SameSite=Lax, and the Partitioned attribute then has no effect. Developers working with embedded challenges should therefore treat partitioning and HTTPS as normal browser constraints, not as evidence that the protection is malfunctioning.

Sticky Residential Proxies

Keep one residential IP for the whole session, so the network context stays the same while your browser holds its Cloudflare cookies.

Try With Trial $1.99, 100Mb

__cf_bm Cookie: How Cloudflare Bot Management Scores Sessions

The __cf_bm cookie supports Cloudflare Bot Management and Bot Fight Mode by storing encrypted information related to bot detection and proprietary bot-score calculations. Cloudflare creates it separately for each protected site, and it expires after 30 minutes of continuous inactivity. It is not a user ID and does not represent a passed challenge.

A Cloudflare bot score ranges from 1 to 99: 1 means automated, 2–29 is likely automated, and 30–99 is likely human. A score of 0 means Bot Management did not evaluate the request, which does not mean the request is human. Granular scores are available only to Enterprise Bot Management customers, who can use them in WAF rules, Workers, analytics, and logs; other plans see bot traffic only as groupings in Bot Analytics.

What the __cf_bm Cookie Stores

Cloudflare does not publish a field-by-field decoding format for __cf_bm. Its documentation says the cookie contains information needed to calculate bot scores; data other than time-related information is encrypted. When Anomaly Detection is enabled, it can also contain a session identifier, although Cloudflare is deprecating that engine and no longer onboards new customers to it.

That makes attempts to read the value as a public data structure misleading. It is an internal security input, not an exposed analytics record containing a readable person ID, IP address, or score.

Its 30-minute inactivity expiration is also separate from the 30-minute default Challenge Passage. The numbers happen to match by default, but they belong to different systems.

Bot Management vs Bot Fight Mode

Cloudflare Bot Management is the more configurable Enterprise product: it generates granular 1–99 scores and lets customers use them in WAF rules, Workers, Bot Analytics, and logs. Bot Fight Mode, the free option, identifies traffic matching known bot patterns and issues computationally expensive challenges. It cannot be skipped with WAF custom rules, so sites that need exceptions use Super Bot Fight Mode instead.

Both products can involve __cf_bm, but the presence of the cookie does not reveal which action a site will take. A request may still be allowed, challenged, or blocked according to the site's rules and the current evaluation. The reverse also holds: a site can disable __cf_bm through the API, so a missing cookie does not prove that bot protection is off.

cf_clearance vs __cf_bm: Key Differences and a Session Timeline

cf_clearance represents challenge clearance, while __cf_bm supports bot detection and scoring. They can participate in the same browsing session, but one is not a replacement for the other, and neither should be treated as a permanent guarantee that all later requests will be accepted.

Feature

cf_clearance

__cf_bm

Main purpose

Challenge-clearance state

Bot-detection signals

Associated system

Challenge Platform, JavaScript Detections, Turnstile pre-clearance, Precursor

Bot Management / bot protection

Typical lifetime

Challenge Passage; 30 minutes by default

30 minutes of inactivity

Is it a challenge pass?

Yes, within its valid context

No

Related to bot score

Indirectly, via JavaScript Detections and Precursor

Yes

Partitioned

Yes

No

A simplified session looks like this:

request → risk evaluation → challenge if required → clearance issued → later requests → ongoing session evaluation → expiry or context change → possible re-challenge.

At the same time, the bot-management system can continue recalculating request risk. That is why debugging only one cookie can miss the larger decision process.

Why Automated Sessions Get Re-Challenged

Why Automated Sessions Get Re-Challenged

Cloudflare can re-challenge an automated session when the configured passage expires, browser state disappears, a higher clearance level is required, or Precursor changes the effective trust level. In Armed mode, Precursor can explicitly cause another verification before the browser cookie expires.

For permitted Cloudflare scraping, this means the useful question is not "is the cookie present?" but "is this still the same coherent session Cloudflare evaluated earlier?"

Expired Passage, Precursor, and Missing Cookies

Expiration is the simplest cause. With the default configuration, challenge clearance lasts 30 minutes. A fresh browser profile, cleared cookie jar, or newly created automation context can also remove the stored state required to recognize the earlier verification.

Precursor introduces a second path. It continuously evaluates behavior and, in Armed mode, can reduce or invalidate effective clearance. A session can therefore receive another check even while the stored cookie has not reached its nominal expiration.

A Changed Context: IP, User-Agent, TLS

A sudden change in IP address, User-Agent, TLS characteristics, or browser state can make one logical session less consistent. One concrete example from Cloudflare's documentation: a request with a missing or empty User-Agent header immediately gets a bot score of 1 from the heuristics engine.

This does not mean that one changed header automatically triggers a block. It means the complete context can be evaluated again. If you are debugging a permitted collector, Froxy's guide to User-Agents for web scraping provides useful background on one part of that context.

Re-Challenge or Block? How to Tell

A new Cloudflare Managed Challenge, Cloudflare Turnstile prompt, or Cloudflare “Verify you are human” page asks the visitor to verify again. A Cloudflare 403 is an access denial, but not every 403 on a Cloudflare-proxied site comes from the same Cloudflare product or from Cloudflare at all. A challenge page itself is usually served with HTTP 403 as well, so the status code alone does not tell the two apart. A challenge response carries the cf-mitigated: challenge header, while a block or an origin-side 403 does not.

Site owners should check Security Events, Ray IDs, response headers, and origin logs before assigning a cause. A timeout or empty response is another separate symptom. Distinguishing these outcomes is more useful than treating every failure as one generic anti-bot block.

Keeping Data Collection Sessions Stable with Sticky Proxies

A sticky proxy keeps one exit IP for a logical session, which can make network context more consistent when the browser already has cookies and established state. For permitted data collection, that is often easier to reason about than changing the IP on every request while expecting the rest of the session to remain unchanged.

This is a session-management technique, not a way to disable Cloudflare. A proxy does not turn off bot scoring, challenge rules, or a site's access policy.

Froxy's residential proxies support session-based use where a stable residential exit is needed. Mobile proxies are available when the application specifically needs a mobile-network address.

The key distinction is sticky inside a session versus rotation between independent sessions. See how to generate a different IP for each session for that model. Python collectors can use the setup described in Python Requests proxy configuration, while larger pipelines may use rotating proxies in Scrapy.

Mobile Proxies with Sticky Sessions

Mobile-carrier IPs that hold one address per session for collectors that need a consistent mobile network context.

Try With Trial $1.99, 100Mb

Other Cloudflare Security Cookies: _cfuvid, __cflb, __cfruid, __cfseq

Other cookies from Cloudflare support rate limiting, load balancing, and request-sequence analysis rather than challenge clearance or bot scoring. Understanding their individual roles prevents a cookie audit from incorrectly labeling every __cf* value as the same kind of anti-bot mechanism.

_cfuvid can be set by Rate Limiting Rules when a site uses Cloudflare's unique-visitor field. It helps distinguish individual visitors who share the same public IP, such as users behind NAT. Without that identifier, those visitors can be grouped together for rate-limiting purposes.

__cflb supports Load Balancer session affinity and can keep later requests on the same origin. Depending on configuration, it lasts from several seconds to 24 hours. __cfruid belongs to the previous version of Rate Limiting, while __cfseq supports Sequence Rules that evaluate the order and timing of requests.

Are Cloudflare Cookies Tracking Cookies? Privacy and Consent

Are Cloudflare Cookies Tracking Cookies

Cloudflare says the security and infrastructure cookies in its reference are strictly necessary for the corresponding services unless otherwise stated, so they are not equivalent to advertising trackers used for cross-site profiling. However, Cloudflare cookie consent and disclosure requirements still depend on local law, the site's configuration, and how data is processed.

Cloudflare also says the bot-management cookie is not a customer-application user ID, is created separately for each site, and is not used to track users across sites or sessions. Website owners should still document the cookies they use and explain their purpose in an appropriate privacy or cookie policy.

The safest editorial description is therefore "security/necessary cookie" where that matches the actual configuration, not "tracking cookie" by default and not "consent is never required" as a universal legal conclusion.

Conclusion

Developers should remember the functional split: challenge clearance records a successful verification state, while the bot-management cookie supports automated-traffic scoring. Both sit inside a larger security context, and neither guarantees that the session will never be evaluated again.

The default Challenge Passage is 30 minutes, but on sites with Precursor in Armed mode, an active session can be reassessed before that period ends. The bot-management cookie has its own 30-minute inactivity expiration. Those are separate timers for separate mechanisms.

For legitimate automation, keep browser state, cookies, and network context coherent inside one logical session. If a proxy is required, a sticky residential session can provide network continuity without treating constant IP rotation as a substitute for proper session management.

FAQ

Why am I seeing Cloudflare in my browser?

A site is using Cloudflare to inspect or protect incoming traffic, and your request matched a rule or risk condition that requires verification. Depending on the site's setup, you may see an interstitial check, Turnstile, or a Cloudflare “Verify you are human” page before access continues.

Does Cloudflare collect personal data through its security cookies?

Cloudflare's security cookies process technical information needed by its services. The company says its bot-management cookie is not the site's user ID and is not used to track a person across sites or sessions. Website owners should still describe relevant processing in their privacy documentation.

Is it safe to accept cookies on a website using Cloudflare?

Cloudflare's documented security cookies are generally used for protection and infrastructure rather than advertising profiling. Whether to accept cookies remains a privacy choice, so users who need more detail should review the website's own privacy and cookie notices and the purposes listed there.

Why does Verify you are human return after I clear my cookies?

Clearing cookies removes stored challenge state. A later request can therefore look like a new session without the earlier verification. Cloudflare may ask for another check, and on sites that use Precursor, the new session is evaluated from the beginning rather than inheriting prior trust.

What happens if my browser blocks security cookies from Cloudflare?

Some Cloudflare features may lose the state they expect between requests. Depending on which cookie is blocked, challenge clearance, rate-limiting identity, or load-balancer affinity can behave differently. On protected sites, that can result in repeated verification or a less consistent browsing session.

Get notified on new Froxy features and updates

Be the first to know about new Froxy features to stay up-to-date with the digital marketplace and receive news about new Froxy features.

Related articles

Proxy Server Types: A Technical Deep Dive

Proxies

Proxy Server Types: A Technical Deep Dive

Explore proxy server types and how they work. See how types of proxies are classified by protocol, anonymity levels, and IP source to choose what...

Team Froxy 17 Feb 2026 9 min read
What Is Dynamic IP (Address with Rotation)?

Proxies

What Is Dynamic IP (Address with Rotation)?

Learn what IP address rotation is, how it differs from a dynamic IP, and how rotating proxies let you change your public IP without relying on your...

Team Froxy 23 Mar 2023 5 min read