Search code examples
javascriptrecaptcha

How to get google recaptcha icon similar to one which is shown below?


I am in a process of process of migrating some wordpress based website to my hosting. The thing is that google recaptcha is showing "Error for the site owner, invalid domain for site key". The JS code for the same is, as given below,

<script async src="https://www.googletagmanager.com/gtag/js?id=some_id"> </script>

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'some_id');
</script>

<script src='https://www.google.com/recaptcha/api.js?render=site_key_or_secret_key_which_I_donot_know_exactly'></script>

I have got my own site key and secrete keys as well for the migration process.

What should I do to get the output as given in the image link Google Recaptcha Icon. Thank you for the help in advance.


Solution

  • It says that invalid domain for site key. The key you generated for Recaptca seems to be have your own domain name , try changing it to required domain name and generate the site key for the same. It will work.

    Unless you put the site in domain it requires , you will not be able to use Recaptcha.