On this page
What this issue is
reCAPTCHA is Google's tool that tells humans from bots on forms. When you create it, you get a site key (public, in your page) and a secret key (private, used by your server to check the result). Each key pair is registered for a list of domains.
If the page that shows the widget is on a domain not in that list, Google rejects the request. The widget shows a red 'ERROR for site owner: Invalid domain for site key' message, or does not render properly. The browser console may also show a reCAPTCHA error. Often the form then cannot be sent, or the server rejects the missing token.
- The site moved to a new domain or was rebranded
- The domain list has example.com but the form is on www.example.com, or the other way round (subdomains are covered when you list the parent domain, but check your setup)
- A staging, preview or builder domain (for example a temporary Webflow or Wix address) uses production keys
- Keys were copied from another client's or another site's project
- A landing page tool or funnel builder serves the form on a custom domain you never added
- The key type does not match the code: a v2 key used with v3 code, or the reverse
- Domain validation was turned off or changed in the admin console
Why it costs you leads or sales
The page still loads, so nothing looks wrong in your analytics at first. But visitors who fill in the form cannot finish it, or their submission is rejected after they press send. Paid traffic keeps arriving and the lead step quietly stops working.
- Ad clickVisitor lands on your page
- Form loadsFields are filled in
- reCAPTCHA checkInvalid domain for site key
- Lead email and CRMNever receives the lead
- Conversion tagNever fires on a thank-you page
The domain check fails before the form can send, so everything after it is lost.
Example: a site that gets 40 leads a week drops to near zero after a domain change, while ad spend stays the same.
How to check if your site has it
Open the live form in a private window
Use the real public URL, on the exact domain visitors use (with or without www).
Look at the reCAPTCHA widget
A red message reading 'ERROR for site owner: Invalid domain for site key' confirms it. A missing widget needs the next step.
Open the browser console
Press F12 (or Cmd+Option+J on Mac Chrome) and open the Console tab. Look for reCAPTCHA errors such as 'Invalid domain for site key'.
Find the site key in the page source
Search the source for data-sitekey or for api.js?render= and note the key.
Compare it with the admin console
Open google.com/recaptcha/admin, find the key and check its Domains list against the domain in your address bar.
Try the other domain variants
Check www and non-www, and any funnel or checkout subdomains that host a form.
The form looks normal until the reCAPTCHA check runs and rejects the domain.
How to fix it
There are two ways to fix it. Either add the missing domain to the existing key, or create a new key pair for the right domain and replace both keys wherever they are used. Use the first option when the keys are correct and only the domain is missing.
Sign in to the admin console
Go to google.com/recaptcha/admin with the Google account that owns the key. If you do not know which account, ask whoever set the site up.
Select the site
Pick the key matching the site key in your page source.
Open settings
Click the gear icon for Settings and find the Domains section.
Add the domain
Enter the domain without https:// or a path, for example example.com. Add every domain that hosts the form.
Save and reload
Save, then hard-refresh the form page. Changes can take a few minutes.
Find where the keys live
Depending on your form plugin this is in Contact Form 7 > Integration, WPForms > Settings > CAPTCHA, Gravity Forms > Settings > reCAPTCHA, or a dedicated reCAPTCHA plugin.
Paste the new site and secret keys
Make sure the key type (v2 checkbox, v2 invisible or v3) matches the type selected in the plugin, then save.
Clear caches
Purge your caching plugin and CDN so the old site key is not served.
Check the Webflow form setting
Open Site settings > Forms and look for the reCAPTCHA section. Add your site key and secret key if you use your own.
Publish to the custom domain
Publish and test on the live custom domain, not only the webflow.io address, and make sure both are listed in the key if you use both.
Use the built-in setting where possible
Wix manages its own form spam protection. If you added a custom reCAPTCHA through embedded code, check that the key lists your connected domain.
Test the connected domain
Open the form on the live domain and check for the error.
Check the Google reCAPTCHA setup
If you added your own reCAPTCHA through code injection or a third-party form, open it and confirm the key lists your primary domain.
Test the primary domain
Open the live form on the primary domain and confirm the error is gone.
Check custom code and the funnel domain
If a form or survey uses your own reCAPTCHA keys through custom code, add the funnel's custom domain to the key's domain list.
Test on the funnel's live URL
Load the published page on its custom domain and submit it.
Check any Custom HTML tag that loads reCAPTCHA
If a tag injects the widget, confirm the site key in the tag matches the key registered for this domain.
Preview and publish
Use Preview mode, check the console for errors, then publish the container.
Update the site key in your front end
Replace the value in data-sitekey or in the render parameter of the script URL.
Update the secret key on the server
Use the matching secret in your server-side verify call. Keep it out of public code.
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<form action="/contact" method="POST">
<!-- other fields -->
<div class="g-recaptcha" data-sitekey="YOUR_SITE_KEY"></div>
<button type="submit">Send</button>
</form>How to confirm it's fixed
- The widget loads on the live domain with no red error message
- The browser console shows no reCAPTCHA errors
- A real test submission goes through and shows your thank-you message or page
- The test lead arrives in your inbox and your CRM
- The conversion tag fires on the thank-you step (check in GA4 or Tag Assistant)
- The same checks pass on www and non-www and on any funnel subdomain
How to prevent it happening again
- Add every domain to the reCAPTCHA key before you launch or move a site
- Record which Google account owns each key and who else has access
- Keep separate keys for staging and production
- Add a reCAPTCHA check to your go-live and domain-change checklists
- After any migration, submit the live forms yourself the same day
- Run an automated check on your forms so a break is caught in hours, not weeks
Before
- Key lists only old-site.com
- Form runs on new-site.com
- Widget shows 'Invalid domain for site key'
- Submissions fail
After
- Key lists old-site.com and new-site.com
- Widget loads normally
- Submissions reach inbox and CRM
- Conversion tags fire
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor runs your real lead-form journey on a schedule, from the EU or the US. It opens the form, fills it in and tries to submit. When the reCAPTCHA domain error appears, FunnelGuard picks up the console errors and the blocked form, and the step fails.
Questions people ask
Why does reCAPTCHA say 'Invalid domain for site key'?
The site key in your page is not registered for the domain the form is on. Google checks the domain list of the key and refuses the request when it does not match. Add the domain in the reCAPTCHA admin console or use the correct keys.
How do I add a domain to my reCAPTCHA key?
Sign in at google.com/recaptcha/admin, select your site, click the gear icon for Settings and add the domain under Domains. Enter it without https:// or a path, save, then reload the form page.
Why did my reCAPTCHA stop working after I changed domain?
Your keys are still registered for the old domain. The new domain is not on the key's list, so Google rejects the check. Add the new domain to the existing key or create new keys and replace both site and secret keys.
Does reCAPTCHA work on localhost or a staging site?
Only if that domain is on the key's list. Many people add localhost or a staging domain to a separate key made for testing, so the production key stays limited to the live domain.
Do I need to add www and non-www separately to reCAPTCHA?
Listing the parent domain, such as example.com, normally covers its subdomains, including www. Test both versions after saving, because the exact behaviour depends on how the key was set up.
Will an invalid reCAPTCHA key stop my form emails?
Yes, often. If the widget cannot validate, the visitor cannot send the form or the server rejects the missing token, so no email or CRM entry is created. Submit a real test to be sure.
How do I know if my form is blocked by reCAPTCHA right now?
Open the live form in a private window, look for a red reCAPTCHA error and check the browser console. An automated form check, such as FunnelGuard's, can run the journey on a schedule and alert you with a screenshot if it fails.
Related issues
- CNV-368CAPTCHA blocks real users (always fails)Fix guide
- CNV-370CAPTCHA widget fails to loadFix guide
- CNV-374Invisible CAPTCHA score too strict, leads dropped silentlyFix guide
- CNV-371WAF blocks form POST (403)Fix guide
- CNV-372Cloudflare challenge on landing page for ad trafficFix guide
- CNV-373Rate limiting rejects legitimate submissionsFix guide