This has been an ongoing arms race for decades, so Cloudflare can’t share the exact implementation details (or bots would just start to use them).
However, this is what they publicly disclose:
Cloudflare challenges:
Challenges are security mechanisms used by Cloudflare to verify whether a visitor to your site is a real human and not a bot or automated script.
When a Challenge is issued, Cloudflare asks the browser to perform a series of checks that help confirm the visitor’s legitimacy. This process involves evaluating client-side signals (data gathered from the visitor’s browser environment) or asking a visitor to take minimal action such as checking a box or selecting a button.
Challenges are designed to protect your application without introducing unnecessary friction. Most visitors will pass Challenges automatically without interaction.
Cloudflare does not use CAPTCHA puzzles or visual tests like selecting objects or typing distorted characters. All challenge types are lightweight, privacy-preserving, and optimized for real-world traffic.
And on a related blog post (Turnstile uses Cloudflare Challenges):
With all of our emphasis on how easy it is to pass a Turnstile challenge, you would be right to ask how it can stop a bot. If a bot can find all images with crosswalks in grainy photos faster than we can, surely it can check a box as well. Bots definitely can check a box, and they can even mimic the erratic path of human mouse movement while doing so. For Turnstile, the actual act of checking a box isn’t important, it’s the background data we’re analyzing while the box is checked that matters. We find and stop bots by running a series of in-browser tests, checking browser characteristics, native browser APIs, and asking the browser to pass lightweight tests (ex: proof-of-work tests, proof-of-space tests) to prove that it’s an actual browser. The current deployment of Turnstile checks billions of visitors every day, and we are able to identify browser abnormalities that bots exhibit while attempting to pass those tests.
For over one year, we used our Managed Challenge to rotate between CAPTCHAs and our own Turnstile challenge to compare our effectiveness. We found that even without asking users for any interactivity at all, Turnstile was just as effective as a CAPTCHA. Once we were sure that the results were effective at coping with the response from bot makers, we replaced the CAPTCHA challenge with our own checkbox solution. We present this extra test when we see potentially suspicious signals, and it helps us provide an even greater layer of security.
It ain’t much, but it boils down to “secret heuristics we use to try to guess whether you’re a real boy”.
Practically, from my experience (as a web developer and normal user), you are more likely to encounter these if:
- You use a lesser-known browser (really, anything other than Chrome)
- In any sort of anti-tracking mode
- If you’re behind any sort of VPN other than Cloudflare’s own (WARP)
- If you’re from a part of the world, or share a network with, devices and users that have known to be part of past bot behavior
There is a Cloudflare browser extension you can use to help attest to your humanness: Cloudflare Privacy Pass
This may help you get fewer challenges. But note the date on that: 2020, right before the dawn of AI.
These days, bot traffic is so much worse now (because of LLMs and fully automated fake browsers and real-device farms) that Cloudflare has to work overtime to try to detect and stop them. Us puny humans are just collateral damage in the great bot vs bot wars 