• Register
1 vote

Problem :

I am trying to use the reCaptcha but I am facing below error

Localhost is not in the list of supported domains for this site key.

I want to develop my website using the PHP and also I want to make the human verification in one of my sessions. So I am initially running my system locally and when my system is ready I want to put it on in the certain domain.

How can I fix above error?

8 5 2
3,230 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

I had faced the above error in the recent past so I am trying to help you in fixing your error.

The ReCaptcha is not supporting the localhost anymore. Please read the detailed description as given below:

The localhost domains are now not supported by default. If you still want to continue the support for them for your development then you must add them to your list of supported domains for the web site key. To do that you must go to your admin console to update the list of supported domains. I still advise you to use the separate key for your development and the production and also do not allow the localhost on the production site key.

So simply you need to add localhost to the list of domains for your web site and then you are good.

8 4 1
5,680 points
0 votes


"In case you would like to exercise "localhost" for development, you should include it to the list of domains."

This will just perform in case you access localhost exercising rather than localhost/....

The real answer is preserved below.

"localhost domains are no longer approved by default. In case you wish to main supporting them for development you can include them to the list of adopted domains for your site key. Go to the admin console to update your list of adopted domains. We conference to employ a separate key for development and production and to not approve localhost on your production site key."

So only include localhost to your list of domains for your site and you'll be good.

"With the following test keys, you will always obtain No CAPTCHA and all verification requests will pass.

Site key:


Secret key:


The reCAPTCHA widget will display a warning message to assertion that it's just for testing purpose. Please do not exercise these keys for your production traffic."


In case your question is how to set reCaptcha in Google site for exercising it in localhost, then i has been wrote it above however in case you are curious that how you can employing reCAPTCHA on both localhost and website host by minimal codes in your controller and prevent some codes like ConfigurationManager.AppSettings["ReCaptcha:SiteKey"] in it then I help you with this extra description and codes in my answer.

Employing these keys below, you can apply your tests on localhost, these keys are given in the above link for testing purposes by google:

Secret key: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe

Google includes a message on recaptcha to prevent users and the administrator that keys are only for tests.

10 6 4
31,120 points

Related questions

0 votes
1 answer 2 views
Problem: What caused the error," Error for site owner:invalid domain for site key " ?
asked Apr 10 zayed1 58.7k points
0 votes
1 answer 25 views
Problem: error for site owner invalid domain for site key recaptcha
asked Feb 18 charles mathews 5.5k points
0 votes
1 answer 7 views
Problem: I am just getting localhost is currently unable to handle this request. xampp, Does anyone know how to fix it?
asked Apr 1 zayed1 58.7k points
0 votes
2 answers 7 views
Problem: I have a project in my local created with springBoot, java, jHipster, Angular, etc and I want to run it. Usually I have used mvnw to run the project. Now I changed computer so when running mvnw in cmd it says app running in https://localhost:8080 and when I go ... -ano | findstr 8080 in cmd and found in task manager that port 8080 is used by java.exe. Maybe it is a port issue? Thanks!
asked Apr 25 Yeamin 21.4k points
0 votes
1 answer 9 views
Problem: This is showing can anyone help me with why I can’t have permission to access / on this server localhost?
asked Mar 31 zayed1 58.7k points
0 votes
1 answer 1 view
1 view
Problem: I was trying google Recaptcha on the Safari browser which couldn't work (It's working on any other browser like Edge, IE, Firefox, Chrome). After waiting for a minute it returns:Could not connect to the reCAPTCHA service. Please check your internet connection and reload to get a reCAPTCHA challenge.any idea to resolve this?
asked 3 days ago sumaiya simi 43.9k points
0 votes
1 answer 2 views
Problem: I need someone to understand this problem and find out the solution of access denied for user 'root'@'localhost' xampp.
asked Apr 8 ashik 14.6k points
0 votes
1 answer 7 views
Problem: Any ideas on what I need to solve this problem?error: 'access denied for user 'root'@'localhost' (using password: no)'
asked Apr 4 ashik 14.6k points
0 votes
1 answer 106 views
Problem : I am new to MySql. The problem started when I was unable to login to Mysql using my Mysql console. It is repeatedly asking me the password and now I am unable to remember my password. Can I change my password ? And now when I am trying to open my PhpMyAdmin ... WAMP and after that deleted all my related files and then reinstalled it .But it did not fix my issue. How can I fix the issue ?
asked Feb 26, 2020 mphil 2.3k points