Cookies & analytics

We'd like to use analytics to understand how this site is used. Nothing loads or fires until you agree. See our privacy policy for the full list of processors.

webclaw
PricingDemo
2,390
Back to blog
April 21, 2026Updated September 26, 2026Massi

Cloudflare Turnstile: How It Works and Why Checks Fail

On this page

  • What is Cloudflare Turnstile?
  • Managed, non-interactive and invisible modes
  • How does Cloudflare Turnstile work?
  • Token expiry and duplicate submissions
  • Turnstile vs Cloudflare Challenge Pages
  • Why Turnstile verification fails
  • What Turnstile means for web scraping
  • Frequently asked questions
  • Is Cloudflare Turnstile a CAPTCHA?
  • Does Turnstile require JavaScript?
  • Does a 403 response mean Turnstile blocked me?
  • Can curl or a different User-Agent bypass Turnstile?
  • Can Puppeteer or Playwright guarantee a successful check?
  • Is a Turnstile token the same as a cfclearance cookie?

Cloudflare Turnstile is a CAPTCHA alternative that a site owner embeds in a page. It runs browser checks, produces a short-lived token, and lets the site's server verify that token before accepting an action such as a signup or form submission. Managed mode can ask the visitor to check a box.

A full-page “Verify you are human” screen is a separate Cloudflare Challenge Page. A 403 response alone does not identify either one. Start by checking which response you received before changing your browser, HTTP client or extraction code.

What is Cloudflare Turnstile?

A developer can add Turnstile to a website without routing that website through Cloudflare's CDN. The browser loads the widget from challenges.cloudflare.com; the application keeps its own form and decides what to do after verification. Cloudflare describes the browser checks and deployment model in its Turnstile overview.

The integration has two parts:

  • The public sitekey identifies the widget in the browser.
  • The private secret key lets the backend validate a response token through Cloudflare's Siteverify API. Keep this key on the server.

A visitor seeing a success indicator has completed the client-side step. The application's backend still needs to validate the token before it accepts the protected action.

Managed, non-interactive and invisible modes

The widget mode controls whether a visitor sees or interacts with verification. It does not remove the server-side validation requirement.

ModeWhat the visitor seesInteraction
ManagedA widget; Cloudflare may display a checkboxA checkbox if Cloudflare requests it
Non-interactiveA visible widget with a loading indicatorNo visitor interaction
InvisibleNo visible widgetNo visitor interaction

Cloudflare recommends Managed mode in its widget documentation. Managed does not mean “always show a checkbox,” and invisible does not mean “run on every request to the domain.” Your integration determines where and when the widget runs.

How does Cloudflare Turnstile work?

The browser runs small JavaScript challenges that help Cloudflare assess the visitor's environment. Its public documentation describes checks such as proof-of-work and browser API probes; it does not publish a fixed ranking of all detection signals.

The application then completes this flow:

  1. Load the Turnstile widget on the page.
  2. Obtain its response token after the client-side check succeeds.
  3. Send that token to your backend with the form or protected request.
  4. Call Siteverify from the backend and check the validation response.
  5. Accept the action only if verification and the application's other checks pass.

For an embedded form, the default response field is cf-turnstile-response. Cloudflare documents both implicit and explicit widget rendering in its client-side integration guide.

Token expiry and duplicate submissions

A Turnstile token lasts 300 seconds and allows one validation. A second submission with the same token, or a submission after it expires, can fail with timeout-or-duplicate. Generate a fresh token for a new attempt.

The backend must check success, then validate the expected hostname and action where applicable. A verification timeout or failed response must not fall through into accepting the form. Follow Cloudflare's Siteverify reference for the request fields and error codes.

An HTTP success response from Siteverify is not enough: read the JSON validation result. Do not log the secret or full response tokens while debugging.

Turnstile vs Cloudflare Challenge Pages

Both use Cloudflare's challenge technology, but they appear at different points in a request flow.

EvidenceWhat it supportsWhat it does not prove
cf-turnstile element or Turnstile script on the pageThe site includes a Turnstile integrationThat reading the page requires submitting a token
cf-mitigated: challenge response headerCloudflare returned a Challenge PageThat an embedded form widget caused it
403 plus a Cloudflare Ray IDA request through Cloudflare failedWhich rule or verification system rejected it
Normal page HTML, but missing contentThe initial response lacks the expected dataThat a CAPTCHA caused the missing content

Cloudflare documents cf-mitigated: challenge as the response marker for Challenge Pages. These responses use HTML even if your application expected JSON.

Turnstile normally returns a token. With optional pre-clearance, it can also issue a cf_clearance cookie for a configured Cloudflare zone. The cookie and token serve different purposes; pre-clearance does not replace Siteverify validation. See the clearance documentation.

Why Turnstile verification fails

Check the failing stage instead of treating every failure as a browser fingerprint problem.

SymptomCheck first
Widget never loadsScript loading, network errors and the site's Content Security Policy
Widget reports an errorIts error callback and Cloudflare's documented error code
Widget succeeds but the form failsWhether the backend received the token and called Siteverify
timeout-or-duplicateToken age and whether the same token was submitted twice
Works on one hostname but not anotherWidget hostname configuration and backend hostname checks
Automated tests fail inconsistentlyWhether the test environment is using production challenge keys

For client-side failures, use Cloudflare's error-code reference to investigate the specific code. A generic “verification failed” message does not distinguish an expired token from a configuration error.

For tests on your own application, Cloudflare provides dummy sitekeys and secret keys with predictable success and failure outcomes. Use them in isolated development tests. Keep real verification enabled in production; a passing dummy-key test says nothing about production challenge acceptance.

What Turnstile means for web scraping

A widget on a signup form may have no bearing on reading the public article beside it. Check whether the response already contains the text you need. Avoid submitting forms when your task only requires reading a public page.

For a failed extraction, record the status, response type and whether the output contains the expected heading and body. An HTML challenge saved as Markdown is still a failed extraction. Keep it out of your search index or research corpus.

Use the Cloudflare scraping diagnostic checklist for broader request failures and the Cloudflare error-code guide to distinguish response categories. Network fingerprinting belongs to the broader request-diagnosis discussion; it does not justify calling every blocked request a Turnstile failure.

For pages you have permission to process, you can evaluate the Webclaw demo or use the scrape API. Check the returned content against the source page. Protected targets can still fail; Webclaw does not guarantee access to every URL. The link-to-text guide shows a small extraction example before you try your own target.

Frequently asked questions

Is Cloudflare Turnstile a CAPTCHA?

Cloudflare calls it a CAPTCHA alternative. The widget runs browser checks without image puzzles. Managed mode can still require a checkbox interaction.

Does Turnstile require JavaScript?

The browser-side widget needs JavaScript to execute its checks and obtain a token. The site's backend validates the token with a separate server-to-server request.

Does a 403 response mean Turnstile blocked me?

No. A site can reject requests for many reasons. Inspect the response and the relevant application or Cloudflare logs if you own the site. The cf-mitigated: challenge header identifies a Challenge Page, not an embedded Turnstile widget.

Can curl or a different User-Agent bypass Turnstile?

Changing a header does not perform the widget's JavaScript checks or produce a valid token. An HTTP client can read content that a site serves without that token, which is a different case from completing a protected form submission.

Can Puppeteer or Playwright guarantee a successful check?

No. Browser automation does not guarantee challenge acceptance. For application testing, use the documented test keys in a non-production environment. For data access, prefer the site's supported API, export or permission-based integration.

Is a Turnstile token the same as a cf_clearance cookie?

No. The token is for server-side validation of the protected action. A clearance cookie relates to Cloudflare challenge clearance. A site can enable Turnstile pre-clearance to issue a cookie in addition to the token.

Start building

Turn pages into clean agent context.

Cancel anytime. Use the dashboard, API, CLI, or MCP server from the same account.

Read the docs

Get started

Ship your agent today. Scrape forever.

Cancel anytime. Migrate from Firecrawl in 60 seconds with the compatibility layer.

Read the docs
webclaw

Clean, structured web data for LLMs and agents. Open source, built in Rust — run it on our cloud or your own hardware.

Book a call

Product

  • Cloud API
  • CLI Tool
  • MCP Server
  • Pricing

Free tools

  • All free tools
  • Website to Markdown
  • Website Table to CSV
  • Pricing Page Extractor
  • Brand Kit Extractor

Developers

  • Documentation
  • API Reference
  • SDKs
  • Changelog

Resources

  • Startup Dataset
  • Compare
  • Self-hosting
  • For OSS

Company

  • Blog
  • About
  • Sponsor
  • Affiliate
  • Contact
webclaw
webclaw
© 2026 webclaw · AGPL-3.0 · Built in RustAll systems operational
PrivacyTerms