1
votes

I am trying to add Google reCAPTCHA v2 to my form but it is not displaying. I have the script

<script src="//www.google.com/recaptcha/api.js"></script>
at the end of the head tag of the html and

<div class="g-reCAPTCHA" data-sitekey="A key (original key in here)"></div>

inside of the form before the submit button. I am also using bootstrap code.

I tested this on a seperate page called test.html and it loads but not on this page.

I get the error in the console: GET https://www.google.com/reCAPTCHA/api.js net::ERR_ABORTED 404

1
well it's true that https://www.google.com/reCAPTCHA/api.js doesn't exist, but https://www.google.com/recaptcha/api.js does. So I guess somehow your code is trying to access the version with the erroneous capital letters (the error message doesn't quite match what you've shown as being your code above. I would guess the error message is the accurate one). - ADyson

1 Answers

0
votes

If you go to the link it is a 404 error.

Try changing that link to https://www.google.com/recaptcha/api.js