Hero image

Cloudflare captcha

The short version

If Cloudflare’s “Checking your browser before accessing” page appears for legitimate visitors, the most common cause is an incorrectly configured security level, a missing Turnstile (or reCAPTCHA) integration, or an IP‑address range that Cloudflare now treats as suspicious. Fix the problem by adjusting the security settings, adding a Turnstile widget, and whitelisting any static‑IP services you use.

Identify the exact trigger

When the captcha shows, Cloudflare logs an event that you can see in the Firewall > Overview dashboard. Look for entries that contain the cf.challenge action. The details will tell you whether the challenge was raised because of:

  • Excessive requests from a single IP or subnet.
  • A missing or outdated Turnstile token.
  • A firewall rule that blocks a legitimate user‑agent.

Step‑by‑step fix for WordPress sites

The following procedure works on WordPress 6.4 and later. It assumes you have admin access to the site and to the Cloudflare dashboard.

  1. Check the security level. In Cloudflare, go to Security > Settings and set Security Level to Low or Essentially Off while you troubleshoot. This reduces the chance of false challenges.
  2. Enable Cloudflare Turnstile. Turnstile is Cloudflare’s privacy‑first alternative to Google reCAPTCHA. Create a Turnstile site key in the Cloudflare dashboard under Turnstile > Sites. Copy the sitekey and secret key.
  3. Install a Turnstile plugin. The official Cloudflare Turnstile plugin works out of the box. After activation, paste the site key and secret key into the plugin settings page.
  4. Manually add Turnstile to a custom form. If you use a bespoke contact form, insert the widget code where the form begins. The snippet below is for WordPress 6.4 and uses the wp_enqueue_script hook to load the Turnstile script only on pages that contain the form.
<?php
// functions.php – enqueue Turnstile script on a specific page
function mytheme_enqueue_turnstile() {
    if ( is_page( 'contact' ) ) {
        wp_enqueue_script(
            'cloudflare-turnstile',
            'https://challenges.cloudflare.com/turnstile/v0/api.js',
            array(),
            null,
            true
        );
    }
}
add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_turnstile' );
?>

Then add the widget markup inside the form:

<div class="cf-turnstile" data-sitekey="YOUR_SITE_KEY"></div>

Replace YOUR_SITE_KEY with the key you copied earlier. When the form is submitted, verify the token server‑side using the secret key. The plugin does this automatically, but for a custom implementation you can use the following PHP snippet:

<?php
function verify_turnstile( $token ) {
    $secret = 'YOUR_SECRET_KEY';
    $response = wp_remote_post(
        'https://challenges.cloudflare.com/turnstile/v0/siteverify',
        array(
            'body' => array(
                'secret' => $secret,
                'response' => $token,
                'remoteip' => $_SERVER['REMOTE_ADDR'],
            ),
        )
    );
    $result = json_decode( wp_remote_retrieve_body( $response ), true );
    return $result['success'] ?? false;
}
?>

Whitelist trusted services

If your site calls external APIs from a fixed IP range (for example a headless CMS or a design‑system build server), add that range to Cloudflare’s IP Access Rules. Navigate to Firewall > Tools and create a rule that Allows requests from the IP block. This prevents the firewall from presenting a captcha to your own build processes.

Why Turnstile beats reCAPTCHA for agencies

Turnstile does not require users to solve visual puzzles, which reduces friction on client‑facing sites. It also respects GDPR because no personal data is sent to Google, a point you can highlight when selling WordPress Web Design services to privacy‑conscious brands.

Two common alternatives compared

Cloudflare Turnstile

  • Privacy‑first – no third‑party tracking.
  • Invisible widget – no user interaction required.
  • Free tier includes unlimited challenges.
  • Integrated with Cloudflare firewall rules.

Google reCAPTCHA v2

  • Widely recognised brand.
  • Requires visual challenge for many users.
  • Collects personal data for Google.
  • Limited free usage; high‑traffic sites may need a paid plan.

Fine‑tune Cloudflare firewall rules

After the Turnstile widget is live, you can raise the security level back to Medium or High without re‑introducing challenges for genuine visitors. Use the following rule pattern to allow only verified Turnstile tokens:

http.request.headers["Cf-Turnstile-Token"] exists

Place this rule above any generic “Block” rules. Cloudflare will evaluate the token before applying the challenge.

Testing the fix

Clear your browser cache, then open an incognito window and visit the site. You should see the page load without the “Checking your browser” banner. If the challenge still appears, revisit the Firewall > Events log to see whether a different rule is firing. Adjust the rule order until the Turnstile verification passes before any cf.challenge action is triggered.

What to tell your clients

When you present the solution to an agency client, focus on three concrete benefits:

  1. Reduced bounce rate. Visitors no longer abandon the site because of a captcha.
  2. Improved compliance. Turnstile avoids third‑party data collection, aligning with GDPR and CCPA.
  3. Scalable security. Cloudflare’s edge network continues to block bots, while the Turnstile widget handles human verification.

For a deeper dive into the trade‑offs between Turnstile and Google’s solution, see our comparative guide Cloudflare Turnstile vs reCAPTCHA: Which Is Better?. It explains the performance impact, privacy considerations, and how each integrates with WordPress.

Practical conclusion

Most Cloudflare captcha problems stem from a missing Turnstile integration or an overly aggressive firewall rule. By lowering the security level, adding a Turnstile widget, and whitelisting any trusted IP ranges, you can eliminate the challenge for legitimate users while keeping bots at bay. The steps above are specific, reproducible, and work across typical WordPress installations, ensuring your agency can deliver a seamless, privacy‑friendly experience without needing in‑house developers.

Need help putting this into practice?

Explore our WordPress Web Design, or tell us about your project so we can discuss the next step.

Illustration of a LibraFire team member on a video call with a client

How can we assist you?

Contact Us