Cloudflare Turnstile is Cloudflare’s alternative to CAPTCHA puzzles: it runs small background checks in the visitor’s browser to tell people from automated traffic, usually without asking the visitor to do anything. You add it to a form, such as a contact, sign-up or checkout form. It only protects the form if your server checks its token, and it can stop helpful automated visitors as well as spam bots.
What is Cloudflare Turnstile? #
Cloudflare’s Turnstile overview calls it a “smart CAPTCHA alternative”. It “can be embedded into any website without sending traffic through Cloudflare”, so you can use it even if your site does not sit behind Cloudflare’s CDN. A classic CAPTCHA asks people to read twisted letters or pick pictures. Cloudflare’s Challenges pages say “Cloudflare does not use CAPTCHA puzzles or visual tests”, and that most visitors pass without any interaction. Turnstile guards one form; for whole-site bot control, see bot score, Super Bot Fight Mode and Under Attack mode.
Why not just use a CAPTCHA? #
Puzzles stop some bots but shut out real people and spoil the user experience. The W3C note Inaccessibility of CAPTCHA (a Group Draft Note, December 2021) says CAPTCHA “often prevents people with disabilities from performing the requested procedure”. Blind and visually impaired users are asked to do the task they are least able to do. Cloudflare’s overview says “Turnstile is WCAG 2.2 AA compliant”. Still test it yourself; see web accessibility.
Which widget types are there? #
Cloudflare’s widget page lists three modes:
| Mode | What the visitor sees |
|---|---|
| Managed (recommended) | “Automatically chooses between non-interactive or checkbox challenge based on visitor risk level.” |
| Non-interactive | a visible widget with a loading spinner; no click needed |
| Invisible | nothing: “Runs challenges completely in the background” |
The same family of checks sits behind Cloudflare’s managed challenge, which protects whole pages rather than one form.
What does it cost? #
Cloudflare’s plans page lists a Free plan with up to 20 widgets and 10 hostnames per widget, and 7 days of analytics. Enterprise has unlimited widgets, up to 200 hostnames per widget and 30 days of analytics. Cloudflare says neither plan limits challenges. Turnstile Analytics shows how many challenges were issued and the solve rate.
A worked example #
A law firm adds Turnstile to its enquiry form. Cloudflare’s client-side rendering guide shows two parts for the page. The script:
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
And, inside the form, the widget:
<div class="cf-turnstile" data-sitekey="<YOUR-SITE-KEY>"></div>
This is “implicit” rendering: the script finds the box when the page loads. Pages that build forms later use “explicit” rendering with turnstile.render(). Cloudflare warns: “Proxying or caching this file will cause Turnstile to fail when future updates are released.” Load api.js from Cloudflare’s own address.
When a visitor passes, the widget puts a token in a hidden field named cf-turnstile-response. The firm’s server must then send that token, with its secret key, to the Siteverify API:
POST https://challenges.cloudflare.com/turnstile/v0/siteverify
secret=<YOUR-SECRET-KEY>&response=<TOKEN>
Cloudflare’s server-side validation guide is firm: “Server-side validation is mandatory.” Without it, the widget alone does not protect the form, because an attacker can post any string as a token.
What should the server check? #
- Time. Each token lasts 300 seconds (5 minutes). An expired token needs a fresh widget, for example with
turnstile.reset. - Once only. A token is for one validation. A reused one fails with
timeout-or-duplicate. - Size. A token can be up to 2048 characters, so do not cut the field short.
- The answer. The reply holds
success,challenge_ts,hostname,error-codes,actionandcdata. Check thathostnameis your site. - Retries. An optional
idempotency_keymakes a retry safe. An optionalremoteippasses the visitor’s address.
How do I test it? #
Cloudflare’s testing page gives dummy keys. The site key 1x00000000000000000000AA always passes, 2x00000000000000000000AB always fails, and 3x00000000000000000000FF forces an interactive challenge. The secret key 1x0000000000000000000000000000000AA always passes validation. Cloudflare says “Production secret keys will reject the dummy token”. Swap in your real keys before you go live, and do not let your real site key allow local domains.
Where should it go? #
Put it where automated sending does harm, and nowhere else:
- Contact and quote forms on a landing page, where spam buries real enquiries.
- Comments and reviews, the user-generated content that spammers fill with links.
- Sign-up and sign-in, where bots try lists of addresses.
- Single-page apps. Cloudflare’s overview says Turnstile can issue a Pre-Clearance cookie for them. Its challenge pages guide suggests this for background (AJAX or fetch) requests, where a full challenge page fails.
Leave it off pages people only read. Each extra check is one more step between a visitor and your call to action. Count form sends with conversion tracking before and after, so you can see if real people are being stopped.
Why does it matter for search? #
Turnstile protects a form, not a page. A search crawler such as Googlebot still reads the page around it. The risks are indirect. A slow third-party script can hurt page speed. A form that real people cannot send hurts your conversion rate. And a strict WAF or bot rule is a different thing from Turnstile; that is where crawlers get blocked. See Bot Fight Mode.
Why does it matter for AI answers? #
An AI agent may try to fill in a form for a person: book a call, ask for a quote, place an order. Turnstile exists to stop automated form use, so it may stop that agent too. If you want agents to act, give them a proper route, such as an MCP server or an API, alongside the protected form. See agentic commerce and the agentic web. Forms are also where planted text arrives; see prompt injection.
Common mistakes #
- Adding the widget but never checking the token on the server.
- Putting the secret key in the page’s HTML. Only the site key belongs there.
- Reusing a token, or checking it after more than 5 minutes, then wondering why real enquiries fail.
- Caching or proxying
api.js. - A Content Security Policy that blocks it. Cloudflare’s CSP page says
script-srcandframe-srcmust allowhttps://challenges.cloudflare.com. - Going live with test keys.
How to check it #
- See whether a page uses it. The Tracking Checker lists every script a page loads; look for
challenges.cloudflare.com. The tech stack checker shows what the site is built with. - Check the headers with the Security Headers Checker: your Content Security Policy must allow
challenges.cloudflare.comfor scripts and frames. The HTTP Header Checker shows the raw headers. - Check what the page sets before consent with the Cookie Checker, and your notice with the UK Shop Compliance Checker. See cookie banner, PECR and UK GDPR.
- Run the JavaScript SEO Checker to see what a visitor without JavaScript gets: the form should still explain how else to reach you. See JavaScript SEO.
- Run the SEO Checker and the Meta Tag Checker on the form page after adding the widget, so nothing else broke.
- Run the Prompt Injection Checker on pages that show what people send, such as reviews.
- Run AI Agent Readiness to see whether agents have a route that is not the protected form, and the AI Readiness Checker for the whole site.
- On WordPress, the WordPress Security Checker looks for open user lists and APIs that a form widget does not cover.
- Test the form yourself on a phone and with a screen reader. Check the form’s colours with the colour contrast checker.
- Send a test with a dummy key, then with your real keys, and confirm your server rejects a made-up token.
Single checks on each tool page: free, no account (2 a day). The full audit: a free account (sign in with an emailed code), 1 a day. In URSY Pro, opening in stages: the prompt injection guard and events and goals for form sign-ups.
What URSY.com counts #
We count people through a cookie-free counter that runs in the browser, so bots that do not run scripts never make page views. A browser that tells us it is automated is an AI agent; today only named agents in the edge log are counted, and the page-counter check comes later. We never keep what people type. See our methodology.
Questions #
Is Turnstile free? #
Cloudflare lists a Free plan with up to 20 widgets and no limit on challenges. Enterprise is priced on request.
Do I need Cloudflare’s CDN to use it? #
No. Cloudflare says it can be embedded into any website without sending traffic through Cloudflare.
Does Turnstile read my form? #
Cloudflare says it “does not access, store, or transmit user communications, form entries, or other page inputs”.
Which widget mode should I choose? #
Managed, unless you have a reason not to. Cloudflare recommends it: it shows a checkbox only when a visitor looks risky, so most people never click anything.
Can I try it without breaking my live form? #
Yes. Use Cloudflare’s dummy site key and secret key on a test copy first. They work on any domain, including localhost.
Why do real enquiries fail? #
Usually an expired or reused token, a blocked script, or test keys left in place.
Will it stop Google reading my page? #
No. It protects the form. Crawl blocks come from firewall and bot rules instead.
Related words #
- CAPTCHA
- Managed challenge
- Web accessibility
- Under Attack mode
- Super Bot Fight Mode
- Bot score
- Web application firewall
- AI agent
Sources #
- Cloudflare Docs: Turnstile, checked 24 November 2026
- Cloudflare Docs: Turnstile client-side rendering, checked 24 November 2026
- Cloudflare Docs: Turnstile server-side validation, checked 24 November 2026
- Cloudflare Docs: Turnstile widgets, checked 24 November 2026
- Cloudflare Docs: Turnstile plans, checked 24 November 2026
- Cloudflare Docs: Turnstile testing, checked 24 November 2026
- Cloudflare Docs: Turnstile Content Security Policy, checked 24 November 2026
- Cloudflare Docs: Challenges, checked 24 November 2026
- W3C: Inaccessibility of CAPTCHA, checked 24 November 2026
Updated 24 November 2026 by URSY.com.
Cite this page: Cloudflare Turnstile. URSY. Updated 26 November 2026. https://ursy.com/wiki/cloudflare-turnstile/ · Section links
Tools for this
- LiveAI Readiness Checkeris your site ready for ChatGPT, Gemini, Claude? Score + fixesRun the check →
- LiveAI Bot Checkerwhich AI bots your robots.txt lets inRun the check →
- LiveRobots.txt Checker + Generatortest any address against your rules, or write new onesRun the check →
- LiveSchema Markup CheckerRun the check →