• 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
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 3 views
Problem: error for site owner invalid domain for site key recaptcha
asked Feb 18 charles mathews 3.8k points
0 votes
1 answer 92 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
0 votes
1 answer 16 views
0 votes
0 answers 28 views
Problem: I have fundamental knowledge in PHP. I have recently written a PHP script which connects to my database setup up with the MAMP. But it does not seem to be able to connect to my database. Each and every time I tried the script has failed with the below message ... ($myresult)) {                 echo $row['username'] . "<br>";         } else {                 echo "Fail";         } ?>
asked Jun 16, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 126 views
Problem : I am using my home network to share my files between devices in my household with no problem, but very recently I had to re-install the Windows 10, after that, no devices were shown under the Network in File Explorer. I can surely ping my devices ... Home network System error 6118 has occurred. The list of servers for this workgroup is not currently available. What seems to be a problem?
asked Feb 3, 2020 jwilliam 3.9k points
1 vote
1 answer 47 views
Problem: Now days I always face the following message: "The reCAPTCHA wasn't entered correctly. Go back and try it again.(reCAPTCHA said: incorrect-captcha-sol." I have already submitted it to my server the fatcow, and they are telling me that my above issue is in present ... trying to insert it into the html form just prior to the end of my form. Kindly guide me in fixing my PHP related issue.
asked Jun 1, 2020 Martin K 6.6k points
0 votes
1 answer 12 views
Problem: I'm trying to add a database-enabled JSP to an existing Tomcat 5.5 application (GeoServer 2.0.0, if that helps). The app itself talks to Postgres just fine, so I know that the database is up, user can access it, all that good stuff. ... /jstl/core" prefix="c" %> <sql:query var="rs" dataSource="jdbc/mmas"> select current_validstart as ValidTime from runoff_forecast_valid_time </sql:query>
asked Feb 20 Ali 5.7k points
0 votes
1 answer 5 views
Problem: Java program to demonstrate this error. This program reproduce this error by first leaving out the required JDBC JAR from classpath and also not explicitly registering the driver before use by not calling Class.forName() method.
asked Feb 18 Ali 5.7k points