How to Install Google reCaptcha V2

Google free service to block spam emails to your website is been out for quite a while. With this tool, your contact pages/forms receive only valid leads. In this blog article, We will explain how the Google reCaptcha V2 works and how to install it in your website from scratch.. yes I know there are plugins out there that do it for you duhhh :)

Requisites:

Step 1:

  • Login to Google reCaptcha website,
  • Click on admin console button at the top right of the page.
  • This will prompt you to login with your Google Account, enter your credentials (username/password) and login.
  • Once login, click on the + button at the top to create a new Site for your Google reCaptcha

google recaptcha v2

  • In the next screen enter:
  1. Name of your website i.e Henry Does,
  2. Click on reCaptcha V2 (we will touch reCaptcha V3 in the next blog article),
  3. In Domains enter your domain URL i.e. henrydoes.com (do not use https or http at the start)
  4. Check that Owners section contains your email.
  5. Accept the terms and conditions
  6. Press Submit

create new site recaptcha v2

  • Once accepted, the following screen will be prompted. Here you need to copy and keep the SITE KEY and the SECRET KEY in a safe place.

secret site key recaptcha v2 blocked

  • These two Keys are all you need to create your Google reCaptcha V2 filter in your wesbite or app.

Step 2:

  • In this section, you need basic HTML knowledge to program your Google reCaptcha V2 filter in the front end of your website.
  • Here you will also need the SITE KEY obtained in Step 1.
  • Code for this step is written in HTML/JavaScript and jQuery library and can be found in our Henry Does Github, click here.

Step 3:

  • In this section, you need basic PHP knowledge to program your Google reCaptcha V2 filter in the back end of your website.
  • Here you will also need the SECRET KEY obtained in Step 1.
  • Code for this step is written in PHP and can be found in our Henry Does Github, click here.

You should be able to generate your own Google reCaptcha now V2. Next blog article we will work with the Google reCaptcha V3.

Chao!.