Skip to main content

Blocked by Cookie Notices, Cache or Security Tools

Most "reCAPTCHA doesn't work" cases are not a key problem. Something on your site or server blocks Google's script, or blocks your server from talking to Google.

How a block shows up​

The plugin needs two things to work:

  1. The browser loads Google's script. The script is https://www.google.com/recaptcha/api.js. Until it loads, the form is not paused and no token is created.
  2. Your server can reach Google. After the form is sent, your server contacts https://www.google.com/recaptcha/api/siteverify to check the token.

If either step fails, the plugin treats the request as invalid. The form is rejected, even for a real visitor. A missing badge is the clearest sign of step 1.

Many consent tools block third-party scripts, including Google's, until the visitor accepts. When the script is blocked, the form is sent without a token and is rejected.

What to do:

  1. In your consent tool, allow Google reCAPTCHA without consent, as a necessary or security service. Or let the visitor accept it before the form is used.
  2. If the tool blocks by address, make sure google.com/recaptcha and gstatic.com/recaptcha are not blocked.
  3. Test in a private window before you accept the cookie notice. If the form works only after you accept, this is the cause.

Whether reCAPTCHA can run without consent depends on your region and your legal advice. Check this with your legal advisor.

Cache, minify and "delay JavaScript" plugins​

Page cache alone is usually fine. The form markup contains an empty placeholder and no per-visitor data. Problems come from tools that change how scripts load:

  • Delay JavaScript until interaction. The reCAPTCHA script may load too late, or only after a click.
  • Combine or minify JavaScript. The script may be merged into another file or broken.
  • Defer all scripts. The order of the plugin's inline script and Google's script can change.

What to do:

  1. Exclude google.com/recaptcha and gstatic.com/recaptcha from delay, combine, minify and defer.
  2. If your tool excludes by name, the script handle is google-invisible-recaptcha.
  3. Clear all caches: plugin cache, server cache and CDN.
  4. Test again in a private window.

Forms that appear after the page loads​

The plugin looks for forms once, when Google's script has loaded. A form that is added later, for example in a popup, a tab or content loaded with AJAX, does not get the reCAPTCHA. Such a form is then rejected on submit. Show the form on the page from the start, or protect it as a custom form.

Security plugins, firewalls and CSP​

CauseWhat happensWhat to do
Content Security Policy (CSP)The browser blocks Google's script and frames.Allow https://www.google.com and https://www.gstatic.com for scripts and frames.
Server firewall or host that blocks outgoing requestsYour server can't reach Google, so every check fails.Ask your host to allow outgoing HTTPS requests to www.google.com.
WAF or security pluginIt blocks the form request or the verification call.Check its log. Allow the request or the address.
Ad blocker or privacy extension in the visitor's browserGoogle's script doesn't load for that visitor.Test in a clean private window. You can't control a visitor's extensions.

Other causes​

  • Your theme doesn't print footer scripts. The plugin adds Google's script in the footer. If the theme is missing wp_footer(), the script is not on the page.
  • Another plugin loads reCAPTCHA too. Two plugins that load Google's reCAPTCHA on the same page can conflict. Turn one off to test.
  • Wrong keys or domain. See Keys don't work.

Find the cause in your browser​

  1. Open the page with the form in a private window.
  2. Open the browser's developer tools (usually F12) and go to the Network tab.
  3. Reload and search for recaptcha. A request for api.js should appear and succeed.
  4. If it is missing or red, something blocks the script: a consent tool, a script optimizer, a CSP or an extension.
  5. Look at the Console tab for messages about blocked scripts or CSP.

If the script loads but forms are still rejected, the likely cause is the server-side check: keys, or your server can't reach Google.

For Gravity Forms, the spam entry has a note that gives the reason. See Contact Forms.