How to add google recaptcha to wordpress website

what is a reCAPTCHA?

Google offers reCAPTCHA as a free service to help safeguard websites against spam and abuse. A “CAPTCHA” is a turing test to distinguish between humans and robots. It is simple for people to figure out but challenging for “bots” and other malicious software.

reCAPTCHA Type

reCAPTCHA v3 (invisible recaptcha)

With the help of reCAPTCHA v3, you can determine whether an interaction is genuine without any user input. It is a pure JavaScript API that returns a score, enabling you to take appropriate action on your website, such as requiring additional authentication factors, flagging a post for moderation, or slowing down content-scraping bots.

reCAPTCHA v2

 The reCAPTCHA V2 can be classified into two types as discribed below;

reCAPTCHA v2 ("I'm not a robot" Checkbox)

reCHAPTCHA-V2

A checkbox labeled “I’m not a robot” must be selected by the user to confirm that they are not robots. A challenge to confirm whether or not they are human will be presented, or the user will be able to proceed right away (without CAPTCHA). With only two lines of HTML needed to render the checkbox, this option is the easiest to integrate.

reCAPTCHA v2 (Invisible reCAPTCHA badge)

reCAPTCHA V2 invisible_badge

Instead of requiring the user to select a checkbox, the invisible reCAPTCHA badge is activated when they click on an already-existing button on your website or by using a JavaScript API call. When reCAPTCHA verification is finished, the integration needs a JavaScript callback. Only the traffic that is considered to be the most suspicious will by default be asked to complete a captcha. Edit your site security preference under advanced settings to change this behavior.

What is the difference between reCAPTCHA v2 and v3?

while reCAPTCHA v2 can provide an image recognition challenge after the user selects the “I’m not a robot” checkbox, reCAPTCHA v3 runs in the background and calculates a user score based on their actions. The probability that the user is human increases with score. When a user’s score falls below a predetermined threshold, the web developer must decide (and program) whether to block, challenge, or take no action.

Add reCAPTCHA to wordpress

Now that we understant what reCAPTCHA is all about, Let us now see how we can add a reCAPTCHA to a wordpress website. to do this, follow the steps outlined below:

Step 1: Register and obtain reCAPTCHA API keys

  • Go to the reCAPTCHA website (https://www.google.com/recaptcha) and sign in with your Google account.
  • Click on “My reCAPTCHA” in the top-right corner.
  • Register your website domain by filling in the necessary information.
  • After registration, you will receive a Site Key and a Secret Key.

Step 2: Install a plugin

  • Login to your WordPress admin dashboard.
  • Go to “Plugins” and click on “Add New”.
  • Search for a reCAPTCHA plugin like “Google Captcha (reCAPTCHA) by BestWebSoft” or “Contact Form 7 reCAPTCHA”.
  • Install and activate the plugin of your choice.

Step 3: Configure the reCAPTCHA plugin

  • Once the plugin is activated, go to its settings page (usually found under “Settings” or “Contact” in the admin dashboard).
  • Enter the Site Key and Secret Key obtained from the reCAPTCHA website.
  • Configure any other settings provided by the plugin according to your requirements.
  • Save the changes.
Scroll to Top