Posts in Category: Security

18 Aug 2017

Add Google reCAPTCHA to Your Website

Google reCAPTCHA is a free service that protects your site from spam and abuse.

You can just follow the steps below to add it to your website.

First of all, go to Google reCAPTCHA, and register your application there. Then you can work on the client and server sides respectively as below:

On the client side (see ref)

First, paste the snippet below <script...></script> before the closing </head> tag on your HTML template, for example:

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

Then paste the snippet below <div...></div> at the end of the <form> where you want the reCAPTCHA widget to appear, for example: