Home/Blog/How to Fix reCAPTCHA ‘Invalid Key Type’ Error (2026)

How to Fix reCAPTCHA ‘Invalid Key Type’ Error (2026)

Contact form with broken reCAPTCHA widget showing invalid key error, spam protection concept

Your form’s reCAPTCHA shows “ERROR: Invalid key type” instead of the checkbox — and every submission is blocked. A reCAPTCHA invalid key type fix is about key-version mismatch: the Site key and the widget on your page are from different reCAPTCHA generations. This 2026 guide explains the mismatch and how to get a matching key pair in place.

Here is what the error means. reCAPTCHA has two incompatible generations: v2 (“I’m not a robot” checkbox / invisible badge) and v3 (score-based, no widget). Keys are generation-specific — a v3 Site key pasted into a v2 widget (or vice versa) produces “invalid key type.” This became far more common after Google’s 2025 migration of reCAPTCHA keys into Google Cloud Console, where old keys were converted and new keys are created differently.

What Causes the Invalid Key Type Error

  • v2 key in v3 widget or vice versa: the classic mismatch — the #1 cause.
  • Post-migration key confusion: Google Cloud migration converting or duplicating keys with changed types.
  • Plugin expecting a different version: your form plugin set to v2 while the keys are v3.
  • Domain not registered: the key’s allowed domains list missing your actual domain.
  • Wrong key pair: Site key from one key pair mixed with the Secret key from another.
  • Enterprise vs standard mix-up: reCAPTCHA Enterprise keys used with standard integration code.

How to Fix reCAPTCHA Invalid Key Type: 7 Steps

Step 1: Identify which version your site uses

Check your form plugin’s reCAPTCHA settings — it will say v2 checkbox, v2 invisible, or v3. The keys you paste must match this version exactly. When in doubt, v2 checkbox is the most compatible.

Step 2: Create a fresh key of the correct type

In Google Cloud Console (reCAPTCHA section), create a new key and select the exact type your plugin expects — v2 checkbox, v2 invisible, or v3 score-based. Register your exact domain(s), including both yourdomain.com and www.yourdomain.com.

Form plugin settings page with Site key and Secret key fields being filled, configuration concept

Step 3: Paste both keys as a matching pair

Copy the Site key and Secret key from the same key entry into your plugin settings. Never mix keys across entries. Save, then hard-refresh (Ctrl+F5) — cached pages may still reference the old key.

Step 4: Match the plugin’s version setting

If the plugin lets you choose the reCAPTCHA version, set it to match your new keys. A plugin rendering a v2 widget with v3 keys (or the reverse) reproduces the error regardless of key validity.

Step 5: Verify domain registration

In the Cloud Console key settings, confirm your domain is listed exactly as visitors reach it — protocol and subdomain matter. Staging domains and localhost need their own entries for testing.

Step 6: Test a real submission

Submit the form in an incognito window. The widget should render normally and the submission should succeed. For v3, check the score in your plugin’s logs — scores below your threshold get rejected, which is normal behaviour, not an error.

Step 7: Clear caches and check for conflicts

Purge page caches and CDN cache for the form page — cached HTML can embed the old key. If multiple plugins load reCAPTCHA (forms + login + comments), consolidate on one to avoid key conflicts. For other form issues, see our WordPress error guide.

How to Prevent Key Problems

  • Document which reCAPTCHA version and key entry each site uses.
  • Use one key pair per site — do not share keys across domains.
  • After any Google-side migration notice, re-verify keys render correctly.
  • Keep a staging entry for testing key changes safely.
  • Monitor form submissions weekly — a broken CAPTCHA silently kills conversions.

Conclusion

“Invalid key type” means version mismatch, nothing more: create a fresh key of the exact type your plugin expects, register your domain, paste the matching Site + Secret pair, and clear caches. Ten minutes of key hygiene restores every form on the site. For more WordPress fixes, browse the KamiWeb blog.