1

I am using Google Recaptcha V2 for my site and I have added 50 domains to support the Captcha on these domains. But I have more than 50 domains to add for and I can't do in google recaptcha admin. So any solutions/suggestions for this?

Amit Sharma
  • 133
  • 8

2 Answers2

3

After doing quite a research, I found that we simply can't add more than 50 domains per key site/secret key pair. However, we can add 50 such key pairs per google account and then create a JSON containing list of domains and its site/secret key pair like

{
   "CaptchaGroups":{
      "Group 1":{
         "CaptchaSiteKey":"group 1 site key",
         "CaptchaSecretKey":"group 1 secret key",
         "Domains":[
            "domain1.com",
            "domain2.co",
            "domain3.edu"
         ]
      },
      "Group 2":{
         "CaptchaSiteKey":"group 2 site key",
         "CaptchaSecretKey":"group 2 secret key",
         "Domains":[
            "domain4.com",
            "domain5.co",
            "domain6.edu",
            "localhost"
         ]
      }
   }
}

Then in code we can read the appropriate domain and use the site/secret key pair to use.

Amit Sharma
  • 133
  • 8
-1

What you can do is go to the Settings of your Google Console Adminpanel and un-tick the option "Verify the origin of reCAPTCHA solutions" - that way you can use the reCAPTCHA v2 on more than 50 domains.

Bullsized
  • 362
  • 4
  • 7