Cloudflare Turnstile

Turnstile is Cloudflare’s privacy-focused alternative to traditional CAPTCHAs. It validates users without puzzles, doesn’t track visitors, and is completely free. This module integrates Turnstile with WordPress login, registration, comments, and popular form plugins.

Use Cases

  • Protect login forms from brute force attacks
  • Prevent spam user registrations
  • Stop bot comments without annoying human visitors
  • Secure contact forms on your site

How It Works

  1. You add your Cloudflare Turnstile API keys
  2. Select which forms to protect
  3. Turnstile widget appears on those forms
  4. Most legitimate users pass invisibly
  5. Suspicious traffic gets additional checks
  6. Bots and spam are blocked

Getting API Keys

  1. Go to Cloudflare Dashboard
  2. Click Add Widget
  3. Enter your site domain
  4. Copy the Site Key and Secret Key
  5. Paste them in module settings

Turnstile is completely free with unlimited verifications. You don’t need a Cloudflare account for your domain — just create a free Cloudflare account.

Protected Forms

WordPress Core Forms

FormSetting
Loginprotect_login
Registrationprotect_registration
Password Resetprotect_password_reset
Commentsprotect_comments

Switchboard Integrations

IntegrationSetting
Simple Formsprotect_simple_forms
Magic Loginprotect_magic_login
OTP Loginprotect_otp_login

Third-Party Forms

PluginHow to Add
Contact Form 7Add [switchboard_turnstile] tag to your form
Fluent FormsAdd “Cloudflare Turnstile” field from Advanced fields

Appearance Modes

ModeDescription
Always VisibleWidget always shown. Most reliable. (Recommended)
On InteractionShows only when user interacts with form
InvisibleNo visible widget. May cause issues — use at your own risk

Invisible mode can cause verification failures depending on your hosting, caching, or other plugins. If you must use it, add the CSS class sb-turnstile-protect to submit buttons.

Settings

SettingTypeDefaultDescription
Site KeyTextYour Turnstile public site key
Secret KeyTextYour Turnstile secret key (kept private)
AppearanceSelectAlwaysWhen to show the widget
Skip Logged-in UsersToggleOnDon’t show CAPTCHA to logged-in users
Error MessageTextCustomMessage shown on verification failure
Whitelisted IPsTextareaIPs that bypass Turnstile (one per line)

Contact Form 7 Integration

  1. Enable “Contact Form 7” in module settings
  2. Edit your CF7 form
  3. Add the tag: [switchboard_turnstile]
  4. Place it before the submit button

Example form:

[text* your-name]
[email* your-email]
[textarea your-message]
[switchboard_turnstile]
[submit "Send"]

Fluent Forms Integration

  1. Enable “Fluent Forms” in module settings
  2. Edit your form in Fluent Forms
  3. Find “Cloudflare Turnstile” under Advanced fields
  4. Drag it into your form before the submit button

Conflict with Other CAPTCHAs

If you have multiple CAPTCHA modules enabled (Turnstile, reCAPTCHA, Simple CAPTCHA), only one will render per form. We recommend using only one CAPTCHA solution to avoid confusion.

FAQ

Is Turnstile really free?Yes. Cloudflare offers Turnstile free with unlimited verifications. There are no usage limits or paid tiers for basic functionality.
Does Turnstile track my visitors?No. Turnstile is designed to be privacy-preserving. It doesn’t use cookies for tracking and doesn’t collect personal data about your visitors.
Why do some users still see a challenge?Turnstile automatically shows challenges to suspicious traffic — VPNs, Tor, certain browsers, or unusual behavior patterns. Most legitimate users pass without seeing anything.
Can I use Turnstile with WooCommerce?The module doesn’t have built-in WooCommerce support. For WooCommerce checkout protection, consider a dedicated WooCommerce anti-fraud solution.
What if Turnstile blocks legitimate users?Add their IP to the whitelist, or enable “Skip Logged-in Users” if they have accounts. You can also try switching appearance modes.

Turnstile requires your site to be accessible from the internet. It won’t work on localhost or sites behind HTTP basic auth.

PRO

Get access to all 166 modules with a single license

Upgrade to Pro