What does the error mean?
Every reCAPTCHA site key has a list of domains it may run on, set when the key was created. When the widget loads, Google compares the host name of your page with that list. If the host is not on it, Google draws the red line ERROR for site owner: Invalid domain for site key where the “I'm not a robot” box should be. The visitor cannot tick anything, because there is nothing to tick.
The words “for site owner” are a hint about who can fix it. If you saw this on someone else's site, nothing in your browser causes it, and only the owner of that site can change the key. Sending them the address of the page helps.
If the page is yours, the fix is almost always one of two things: add the host to the key's list, or use the key that was made for this host. First find out which host Google sees, because it can differ from the one you have in mind.
What did our test show?
On 13 November 2026 we loaded Google's real reCAPTCHA script on a test page and changed two things: the site key and the address the browser thought it was on. Besides Google's published test key, we used three real site keys copied from the HTML of other websites. Site keys are public by design, so any page's source shows them. To put the page on a key's own domain, we told the browser that this domain lived on our test machine, so Google saw the right name while every byte came from us. We never clicked a real key's checkbox.
| # | Site key | Page address | What the widget showed |
|---|---|---|---|
| 1 | Google's test key | http://localhost and http://127.0.0.1 | A checkbox under the line “This reCAPTCHA is for testing purposes only. Please report to the site admin if you are seeing this.” Ticking it gave a token |
| 2 | Google's test key | The same HTML opened from disk (file://) | ERROR for site owner: Invalid domain for site key |
| 3 | Checkbox key from another site | localhost and 127.0.0.1 | A normal checkbox, no error |
| 4 | Checkbox key from another site | file:// | ERROR for site owner: Invalid domain for site key |
| 5 | Invisible key from another site | localhost and 127.0.0.1 | “Localhost is not in the list of supported domains for this site key.” |
| 6 | Invisible key from another site | Its own domain, a made-up subdomain, and a.b. in front of the domain | No error |
| 7 | Invisible key from another site | Its domain with .example.net added at the end | ERROR for site owner: Invalid domain for site key |
| 8 | v3 key from another site | localhost and 127.0.0.1 | The badge said “Localhost is not in the list…”, and execute() still returned a token of 548 to 556 characters |
| 9 | v3 key from another site | Its domain with .example.net added | ERROR for site owner: Invalid domain for site key in the badge, and a token of 610 characters |
| 10 | v3 key from another site | Its own domain | No error, a token of 2,212 to 2,233 characters |
| 11 | v3 key in a v2 checkbox | localhost and the key's own domain | ERROR for site owner: Invalid key type |
| 12 | Checkbox key as an invisible widget | localhost | “This site key is not enabled for the invisible captcha.” |
| 13 | A key that does not exist | localhost | ERROR for site owner: Invalid site key |
Three rows surprised us. On localhost and 127.0.0.1 Google does not say “Invalid domain” at all; it says “Localhost is not in the list of supported domains for this site key.” Both addresses got that same sentence. Rows 2 and 4 show that a page opened straight from disk breaks even Google's test key, which otherwise works anywhere. And in row 3 a key from another site worked on our localhost, which means its owner has either added localhost or switched the domain check off. You cannot tell which from the outside.
With v3, a wrong host did not make grecaptcha.execute() fail. It handed back a token about a quarter the length of the ones it gave on the right domain. Only the key's owner can ask Google about such a token, so we could not see the verdict, but a token arriving in your code proves nothing about the key.
Chrome's console printed nothing about the domain in any of the cases. The error exists only as text inside Google's frame, and your own scripts cannot read that frame. You find out by looking at the page, or from your server when the token it checks is empty.
Which address is your page really on?
Open the page where the error shows, open the browser console and run the lines below. The first prints the host name Google compares with your list. The other two print the site keys the page loads, so you can check that the key on the page is the one you edited in Google's console. A theme or plugin can bring its own key, and a page copied from another project often keeps the old one.
Then compare the host with the domains on the key. Most often the site has moved to a new domain, or the page runs on a staging or preview address. Preview hosts from site builders and hosting services usually sit on the provider's own domain, so your main domain's entry does not cover them. Each one needs to be on the list, or needs its own key. Local addresses have their own rules, covered next.
// Paste into the browser console on the page with the form.
location.hostname; // the name reCAPTCHA compares with the key's domain list
// The site keys on the page: v2 widgets carry data-sitekey,
// v3 puts its key in the script address after render=
[...document.querySelectorAll("[data-sitekey]")].map((el) => el.dataset.sitekey);
[...document.scripts].map((s) => s.src).filter((src) => src.includes("recaptcha"));Why did it work on your computer?
Two common setups pass locally and then fail on the live site, or the other way round. The first is Google's test key, 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI. Google's FAQ says that with it “all verification requests will pass”, and in our test it worked on localhost and 127.0.0.1, with a line on the widget saying it is for testing only. If you built the form with that key and swapped in the real one at deploy time, your local test never touched the domain list.
The second is a page opened by double-clicking the HTML file. The address then starts with file:// and has no host, and both the test key and a real key showed Invalid domain for site key. Serve the folder through any local web server and open it at http://localhost instead.
Real keys do not accept localhost unless you add it. Google's FAQ says “localhost domains are not supported by default”, and advises separate keys for development and production, with localhost only on the development key. Our test showed the localhost message on 127.0.0.1 as well. Google's pages only talk about localhost, so if you add it, open your page at that name. The sample below picks the key by host name. Your server then has to verify each token with the secret of the key that made it.
<form id="contact" method="POST" action="/contact">
<label>Email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<div id="captcha"></div>
<button type="submit">Send</button>
</form>
<script>
// The live key lists your real domain. The development key lists localhost.
// Your server must verify with the secret that belongs to the same key.
const SITE_KEY = location.hostname === "localhost" ? "YOUR_DEV_SITE_KEY" : "YOUR_LIVE_SITE_KEY";
function onRecaptchaLoad() {
grecaptcha.render("captcha", { sitekey: SITE_KEY });
}
</script>
<script src="https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoad&render=explicit" async defer></script>How do you add the domain to the key?
Sign in with the Google account that owns the key and open it in the reCAPTCHA admin console. Keys that have moved to Google Cloud live in the Google Cloud console under reCAPTCHA. Find the domain list and add the host from the console check above.
Type the host name only. Google's settings page says a valid domain “must not include any path, port, query or fragment”, so example.com is right and https://example.com/contact is not. You do not need www or other subdomains as separate entries, since the same page says a registration for example.com “also registers subdomain.example.com”. Our test agrees: a made-up subdomain two levels deep passed, while the domain with .example.net stuck on the end failed, as it should.
Then wait before you test again. Google says changes to the domain list “may take up to 30 minutes to take effect”, so a page that still shows the error two minutes later is not proof that you typed it wrong. The Google Cloud console allows up to 250 domains on one key.
The same console has a switch that turns the domain check off. It makes the error go away everywhere, and Google calls it a security risk, because then anyone can use your key on any site. If you turn it off, your server has to check the hostname that comes back with every verification and refuse the ones that are not yours. Adding the right domain is the smaller change.
Can visitors still send the form?
Yes, and that catches people out. In every broken checkbox case of our test, our own Send button still posted the form. The g-recaptcha-response field arrived empty, and grecaptcha.getResponse() returned an empty string. What happens next is up to your server.
If the server verifies the token with Google, every message fails, because there is no token to check. Visitors see whatever your form shows for a failed captcha, and you get no mail. If the server never verifies the token, the form goes through and the captcha on the page protects nothing, broken or not. Our reCAPTCHA v3 guide shows the server check, and the invisible reCAPTCHA guide covers the invisible widget.
Is it the key type instead?
Google uses the same red “ERROR for site owner” start for other mistakes, and the end of the line tells them apart. Invalid key type means the widget and the key are different kinds. We got it by putting a v3 key in a v2 checkbox, on localhost and on the key's own domain alike, so it is not about the domain. Google's troubleshooting page says to check that the key's type in the console, such as “Website • checkbox” for v2, matches the code on the page.
Invalid site key means Google does not know the key at all. A made-up key gave us that line; Google's FAQ also lists a key that is no longer valid. A v2 checkbox key used as an invisible widget gave a different sentence: “This site key is not enabled for the invisible captcha.” Going the other way, our invisible key drew an ordinary checkbox on its own domain with no error, so a widget that looks fine does not prove the key type is the one you meant.
Spam protection on a Formgong form
A Formgong form works without a captcha box. Our server looks for a filled-in honeypot field and scores each message for spam signs such as a pile of links. It also caps how many posts one network or one form can send per minute. None of that uses a site key, so nothing on the page can break when you move the form to a new domain. The form's settings do have an Allowed domains list, and while it is empty the form accepts posts from any page. If you keep a reCAPTCHA widget on a Formgong form anyway, Formgong does not check its token, so the box adds a domain list to look after and no protection on our side.
When you want a visible check, you can switch on Cloudflare Turnstile for the form. Turnstile keys have a host list of their own, and our Turnstile errors guide covers its domain error, 110200. For the route without a captcha, see honeypot form fields and spam protection without a captcha.
The form is one piece of a Formgong account. The same account runs a review widget and an AI help chat on your site, and you can start from one of our templates.
Seen a different message?
If reCAPTCHA shows you a line that is not in our table, or the error stays after the 30 minutes are up, write to us at support@formgong.com with the text and the page address. We will run it the same way and add a row.
Frequently asked questions
Why does reCAPTCHA say Invalid domain for site key?
The host name of the page is not on the site key's domain list. Add the host in Google's reCAPTCHA console, or use the key that was made for that domain. A page opened from disk (file://) shows the error even with Google's test key.
Does reCAPTCHA work on localhost?
Not with a real key, unless localhost is on its domain list. In our test such a key said “Localhost is not in the list of supported domains for this site key.” on localhost and on 127.0.0.1. Google advises a separate development key for this.
Do I need to add www and subdomains to the reCAPTCHA domain list?
No. Google's settings page says a domain also covers its subdomains, and in our test a made-up subdomain two levels deep passed. Enter the host only, without https://, a path or a port.
How long does a reCAPTCHA domain change take?
Google says changes to the domain list may take up to 30 minutes to take effect. Wait that long before deciding the entry is wrong.
What does ERROR for site owner: Invalid key type mean?
The key and the widget are different kinds, for example a v3 key in a v2 checkbox. We saw it on the key's own domain too, so adding domains does not fix it. Create or pick a key of the type your code uses.
Sources and documentation
Official references for this guide: Formgong: reCAPTCHA v3 setup with the server score check, Formgong: How to add invisible reCAPTCHA to a form. HTML forms, where data is stored.
Related guides
- Lovable form submissions to email and Telegram
- HTML contact form without a backend: a working example
- How to send website form submissions to Telegram
- Contact form not sending email? Check where it stops
- Managing website leads in Telegram without a CRM
- Form backend for Lovable, Bolt, v0, Cursor
- Telegram bot for a contact form: build or skip?
- GDPR form backend: 7 checks before you choose
- Lovable form not sending email? 6 fixes
- Netlify Forms not working? React and Bolt fixes
- Stop contact form spam without a CAPTCHA
- GitHub Pages contact form: a working setup
- Mailto Form in HTML: Why It Fails and What to Use
- HTML form to Google Sheets: 2 free methods
- Webflow form submission limit: what to do at 50
- Turnstile vs reCAPTCHA vs hCaptcha for forms
- Contact Form 7 and Elementor forms to Telegram
- Squarespace contact form not sending email?
- Shopify contact form: where do messages go?
- Google Form to Telegram: free Apps Script way
- Wix contact form not sending email? Fixes
- EU / GDPR Formspree alternatives compared
- HTML form action attribute explained
- How do HTML forms work? The HTTP request
- Types of Injection Attacks on Web Forms (2026)
- Indirect Prompt Injection in MCP
- MCP Rug Pull Attack: Detect Tool Changes
- Form without a backend: 7 ways that work
- Thank-you page after form submission (HTML)
- Indirect Prompt Injection Examples (2023–2026)
- Indirect Prompt Injection via Email
- What Is Tool Poisoning in MCP?
- WordPress contact form without a plugin
- Send email from frontend JavaScript
- How to Prevent Indirect Prompt Injection
- Honeypot Form Field: How to Add One That Works
- Contact Form with File Upload (HTML, No PHP)
- Angular contact form without a backend
- Send form submissions to Slack or Discord without Zapier
- Verify a form webhook signature (HMAC-SHA256)
- Contact forms that send nothing: 793 AI-built sites tested
- v0 contact form that actually sends: 3 ways
- How we tested AI-built contact forms, and 12 bugs we hit
- Cloudflare vs Netlify free plan: hosting that never pauses
- EmailJS 412 “Gmail_API: Invalid grant”: reconnect Gmail
- Resend “You can only send testing emails”: verify a domain
- Supabase Edge Function blocked by CORS policy: 3 causes
- Formspree “Form not found” and other errors: fixes
- Web3Forms errors: “Invalid access key” and 403 explained
- How to add customer reviews to your website for free
- Getform not working? “This form has been deleted” and more
- Next.js contact form not working? 6 errors, reproduced
- Webflow form not sending email? What to check, tested
- FormSubmit not working? “This form needs Activation” fix
- Contact form “TypeError: Failed to fetch”: causes and fixes
- WooCommerce product enquiry form
- Contact Form 7 vs WPForms
- Gravity Forms alternative free
- WordPress contact form block
- 535-5.7.8 Username and Password not accepted (Gmail)
- 535 5.7.3 Authentication unsuccessful: Office 365 SMTP
- Nodemailer “Missing credentials for "PLAIN"”: the fix
- Nodemailer “Greeting never received”: port 465 fix
- Nodemailer SSL “wrong version number”: the port fix
- Nodemailer “self-signed certificate in certificate chain”
- Nodemailer ECONNREFUSED 127.0.0.1:587: missing SMTP host
- SendGrid “authorization grant is invalid”: 401 fix
- Mailgun 401 Forbidden: why the API rejects your key
- “Edge Function returned a non-2xx status code”: the fix
- Next.js “Body exceeded 1 MB limit”: Server Action fix
- Unexpected token '<', "<!DOCTYPE "... is not valid JSON
- “TypeError: Body is unusable”: body has already been read
- Turnstile “timeout-or-duplicate” and other siteverify errors
- Turnstile vs hCaptcha vs reCAPTCHA: speed and size tested
- Judge.me reviews not showing on Shopify: how to fix it
- Judge.me review carousel not showing: how to fix it
- Yotpo reviews not showing on Shopify? Check the app embed
- Loox reviews not showing on product page: how to fix
- Shopify reviews not showing: what to check first
- How to show reviews on Shopify
- GDPR for website forms: what each type of form needs
- WooCommerce reviews not showing: how to fix it
- Stamped.io reviews not showing on Shopify: how to fix it
- Etsy reviews not showing: why and what to do
- Trustpilot widget not loading: how to fix TrustBox
- Yotpo problems in 2026: what merchants report
- Contact Form 7 “error trying to send your message” fix
- Elementor form “Your submission failed because of an error”
- Framer form not sending email or not working: what to check
- Carrd contact form not working: plans, spam and errors
- Google review link not working: what customers see and why
- tawk.to widget not showing on your website: causes and fixes
- How to add questions and answers to your product page
- “Failed to send a request to the Edge Function”: fixes
- Next.js “Failed to find Server Action”: what it means
- Brevo “unauthorized: Key not found” 401: the fix
- Amazon SES “Email address is not verified”: the fix
- Shopify contact form not working: how to fix it
- Judge.me alternative for WooCommerce after the 2025 shutdown
- Free WooCommerce review plugins compared on the free version
- WooCommerce review reminder emails without a paid plugin
- Add Voice Recording to a Website Form
- Contact Form 7 spam: how to stop it
- WPForms not sending email: how to fix it
- Contact form emails going to spam: how to fix it
- HTML form not submitting: how to fix it
- Contact form not working: how to find the fault
- Webflow form spam: how to stop it
- Website form to Notion: how to set it up
- Website form to WhatsApp: what works and what does not
- What 1-star reviews say about AI support chatbots
- Which free form backend gives you the most submissions?
- Elfsight reviews widget not showing? Check the view limit
- Next.js contact form backend vs Server Actions
- Review stars not showing in Google search results
- How to stop duplicate form submissions
- How to see which form leads came from ChatGPT
- What happens when a form webhook fails
- When to send a review request email after an order
- How to collect video testimonials for free
- Add contact form sign-ups to Mailchimp or Klaviyo
- How to migrate from Formspree without losing submissions
- How to get a Google review link for your business
- What is a headless form backend?
- Is it safe to put a form access key in your HTML?
- AI chatbot that answers only from your website
- Minified React error #441 in Next.js
- Squarespace product reviews after Judge.me
- Accessible contact form checklist for WCAG 2.2
- How to ask a client for a testimonial by email
- How to respond to negative reviews, with examples
- 429 Too Many Requests on a contact form
- MCP server for forms in Cursor and Claude
- Can you offer a discount for a review?
- Do EU stores have to say if reviews are verified?
- Webflow form backend options compared
- How to add review schema JSON-LD to a product page
- How to turn a customer review into an Instagram post
- How to make a QR code for Google reviews
- Live chat or chatbot for a small business website
- Why people abandon your contact form halfway
- Which form backend do AI assistants pick? 54 answers
- PHP mail() not sending email, even when it returns true
- What “Failed to fetch” means, tested in three browsers
- 405 Method Not Allowed when you submit a form
- Send a contact form to more than one email address
- What is review syndication, and who needs it?
- How to save HTML form data to a database
- NetworkError when attempting to fetch resource
- Send product reviews to Google Merchant Center
- PHPMailer not working on a live server
- AI review reply generator: does it help?
- React 19 contact form with useActionState
- Astro Actions or a form backend?
- Is no-reply@wixsiteautomations.com legit?
- Where to find the Judge.me review widget code
- AI review summaries: what shoppers actually see
- Photo reviews for WooCommerce, and the GPS inside them
- Review request email templates you can copy
- Reviews in AI search: what ChatGPT and Perplexity cite
- Lead capture form with UTM tracking, built and tested
- Form design best practices, with our own form data
- Client intake form template with file upload
- What is social proof? Meaning and examples
- What is user-generated content (UGC)?
- Benefits of negative reviews for your store
- How to get your first reviews as a new store
- How to use customer reviews in your marketing
- How to get more customer reviews
- React form validation without a library, tested
- jQuery submit form with validation
- reCAPTCHA v3 setup with the server score check
- Shopify social proof that shoppers can check
- HTML file input: accept, multiple, capture and size checks
- How to add hCaptcha to a form, with the server check
- How to add invisible reCAPTCHA to a form
- Bug report form template with browser details
- What the FTC fake reviews rule bans for online stores
- How to show reviews on your homepage
- Do reviews increase sales? What the studies show
- HTML input types and what each one sends
- HTML textarea, tested in a real form
- HTML dropdown menu in a form, tested
- Do reviews help SEO? What Google says and shows
- How to add a review carousel people can read
- Product review examples that help shoppers decide
- Which trust badges actually mean something
- Customer satisfaction survey with CSAT and NPS
- JavaScript FormData and what fetch actually sends
- JavaScript form validation without a library
- Server-side form validation and what it catches
- Email validation in JavaScript, tested on 33 addresses
- Zod form validation with FormData, tested
- Store reviews vs product reviews
- How to send review requests through Klaviyo
- How to tag customer reviews by topic and mood
- Custom review form questions worth asking
- Online reputation management for small businesses
- HTML radio button groups and what they send
- HTML label tag and what screen readers hear
- HTML autocomplete attribute, tested with Chrome autofill
- HTML fieldset and legend, and what disabled leaves out
- HTML button tag and what a form button sends
- Vite contact form that still works after the build
- How to test a contact form, end to end
- How to embed a Google Form, and what it loads
- Customer feedback questions that get real answers
- How to convert a file to base64 in JavaScript
- FilePond with a form backend, and when to skip it
- Bootstrap form validation and server errors
- Tailwind form validation, tested in three browsers
- Donation form in HTML, and where the payment goes
- How to ask for a review in person or by text
- Which review sites matter for your business
- What are customer reviews, and which kinds count
- Online review statistics, checked at the source
- Best review app for Shopify and WooCommerce
- Why Gmail sends your self-hosted mail to spam
- htmx contact form that sends to another domain
- AI form builders tested, from prompt to sent form
- Headless WordPress forms with Contact Form 7, tested
- React Hook Form watch vs useWatch, and what gets sent
- Elfsight widget not working? It vanishes when views run out
- Jotform not sending emails? Check Jotform's bounce list
- Typeform not working? A white box means a blocked script
- Positive review response examples that don't sound copied
- How to remove a Google review when you can't delete it
- Google reviews not showing up? 8 causes to check in order
- Is buying Google reviews illegal? Even a review swap counts
- Which reviews can you hide? A review moderation checklist
- Average star rating: what 4.8 from 5 reviews means
- Reviews on a product page: where and how many to show
- SaaS testimonials: 3 of 27 had a number in them
- Do reviews reduce returns? Not when they're too good
- Testimonial examples for business: what makes one believable
- Testimonial questions to ask clients, by type of business
- Testimonial page design: a page or a section?
- Testimonial advertising rules: what the FTC requires
- Form submission canceled because the form is not connected
- Input type date format dd/mm/yyyy: what you can change
- How to disable textarea resize, or allow only vertical
- How to prevent Enter from submitting a form
- form.submit() vs requestSubmit(): what submit() skips
- Custom HTML checkbox CSS that doesn't break required
- How to reset a form after submit, and what reset() keeps
- Input type number maxlength not working? What to use
- How to create an HTML form, step by step
- Best form builder: free plans and branding, checked
- Best WordPress contact form plugin: 10 free ones compared
- How to increase form conversion rate: start with the count
- Form backend vs form builder: which one do you need?
- WordPress contact form not sending email? 3 plugins tested
- Contact Form 7 webhook? Turning it on switched our email off
- Gravity Forms webhook: what it sends and the URLs it rejects
- Failed to set the 'value' property on 'HTMLInputElement'
- Contact form auto reply that bots can't turn into spam
- Best Shopify review apps: 11 compared on what's free
- Google review cards: what the NFC chip really opens