Google reCAPTCHA Setup in WordPress Contact Form
Google reCAPTCHA is a free service from Google that protects your website from spam and abuse. CAPTCHA is Completely Automated Public Turing test to tell Computers and Humans Apart. It is a Turing test to tell humans and bots apart.
You can setup Google reCAPTCHA in WordPress Contact Form in simple steps. This tutorial will walk you through the steps.
Google reCAPTCHA Admin Console- Register Your Website
The first step is to register your website at Google reCAPTCHA Admin Console. Click here to open the reCAPTCHA Admin Console page which is shown below. You will have to sign in to your Google account if not done already. You will see an option to Register a New site.

Type a name in the Label field as shown in the above image. This is to identify the form to which this reCAPTCHA is added. This will be helpful in future if you have more websites registered at the Google reCAPTCHA Admin Console.
reCAPTCHA Versions v2 and v3
Select the reCAPTCHA version which you are going to add. reCAPTCHA v3 verify requests with a score whereas reCAPTCHA v2 uses a challenge.
In this example, we are selecting reCAPTCHA v2. For version v2, there are three options to validate requests. We are selecting the first one as shown in the above image.
In this option the user has to click the “I’m not a robot” checkbox. In the next option which is Invisible reCAPTCHA badge, the user doesn’t have to do anything. A reCAPTCHA badge is displayed and requests are automatically validated in the background. Third option is to validate requests in the android app.

Next, you have to type your website’s domain name in the Domains field as shown above. For example, type mydomain.com or mywebsite.com. Don’t type the ‘http://www‘ prefix.
In the Owners field, your signed in Gmail id will be displayed automatically. Accept the reCAPTCHA terms of service and click the Submit button.
reCAPTCHA Keys- Generate Site Key and Secret Key.
Now reCAPTCHA Keys are generated and the following page will open. This page displays reCAPTCHA Site Key and Secret Key.
In the next step you will have to copy and paste these reCAPTCHA keys to your form. So don’t close this page.

Google reCAPTCHA Integration in WordPress Contact Form
We are demonstrating two examples of adding Google reCAPTCHA in forms. First one shows adding reCAPTCHA in a contact form created using WPForms plugin. Second example is adding reCAPTCHA in a contact form created using Spectra plugin.
Adding reCAPTCHA to WPForms Form
It is assumed that you have already created a contact form in your WordPress website using WPForms plugin. If not, you can create one now.
In this section we will see how to add Google reCAPTCHA to this contact form.
Go to WordPress dashboard. Click WPForms>>Settings>>CAPTCHA and the page shown below will open. Click the reCAPTCHA icon as marked in the image.

Now select the option shown below, which is Checkbox reCAPTCHA v2. This is because we have generated the reCAPTCHA Keys in Google for this option in the earlier step.

Now you have to integrate the reCAPTCHA keys in WPForms. First, copy the Site Key from the Google reCAPTCHA admin and paste it in the text box named Site Key as shown above. Similarly copy and paste the Secret Key also. Click Save Settings button.

Next, open WPForms>> All Forms as shown in left side of above image. Now you can see a list of all the forms you have created as shown in the right side of above image. Find the form in which you want to add the Google reCAPTCHA in the list. Click the Edit link below that as marked above.
Now you the following screen where you can edit the details of the selected form as shown below. Click on the button named reCAPTCHA.

You will see a popup which says Google Checkbox v2 reCAPTCHA has been enabled for this form. Click OK and Save as shown below.

You are all set. Google reCAPTCHA has been added to your WPForms Contact form. Now you can test the contact form to see the reCAPTCHA in action.
Testing reCAPTCHA in WPForms
Open the Contact page of your WordPress website in which the contact form is embedded. You can see a checkbox with the label I’m not a robot and a reCAPTCHA badge as shown below. Type the details, click in the checkbox and submit the form as shown.

If you have not checked the check box before clicking Submit button, you will see that the form is not submitted and an error message displayed as the in the example on the left side of the above image. If you check the I’m not a robot checkbox and submit the form, your form will be submitted successfully as shown on the right side of the above image.
Adding reCAPTCHA to Spectra Form
It is assumed that you have already created a contact form in your WordPress website using Spectra plugin. If not, you can create one now. Spectra is a very easy to use website builder plugin developed by Brainstorm Force, the creators of Popular WordPress theme Astra.
Disclosure: This post contains affiliate links. If you make a purchase by clicking one, sometimes we earn a commission, at no extra cost to you. Thank You !
In this section we will see how to add Google reCAPTCHA to this contact form.
Open WordPress dashboard. Click Spectra>>Settings>>Integrations and the page shown below will open.

(You can ignore the link marked in the right side of the above image. It is to open Google reCAPTCHA Admin Console where you can register your website and generate reCAPTCHA Keys. We have already completed this step earlier.)
Now you have to integrate the reCAPTCHA keys which you had generated earlier in Google into Spectra.
First, copy the Site Key from the Google reCAPTCHA admin page and paste in the text box labelled Site Key v2 under the title reCAPTCHA v2 as shown in the above picture. Similarly copy and paste the Secret Key in Secret Key v2 text box.
After pasting the reCAPTCHA keys the changes will be saved automatically. You will see a Successfully saved message as shown below.

Next step is to enable reCAPTCHA in the Spectra Form block in your Contact page. For that, go to WordPress dashboard and start editing your Contact page as shown in the picture below.
When you click on the Spectra Form block which is embedded in the page, the block’s settings will be displayed in the right side as shown below. In the Google reCAPTCHA section click the Enable reCAPTCHA button to ON position as shown. Select the reCAPTCHA version as V2.
Click Update button to save the changes.

You are all set. Google reCAPTCHA has been added to your Spectra Contact form. Now you can test the contact form to see the reCAPTCHA in action.
Testing reCAPTCHA in Spectra
Open the Contact page of your WordPress website in which the contact form is embedded. You can see a checkbox with the label I’m not a robot and a reCAPTCHA badge as shown below. Type the details and submit the form as shown.

If you have not checked the check box before clicking Submit button, you will see that the form is not submitted and an error message displayed as the in the example on the left side of the above image. If you check the I’m not a robot checkbox and submit the form, your form will be submitted successfully as shown on the right side of the above image.
Please Note:
You will see this I’m not a robot checkbox only if you configure the Checkbox reCAPTCHA v2 version as in the two examples demonstrated here. If you configure Invisible reCAPTCHA v2 or reCAPTCHA v3 version, you will only see a Google reCAPTCHA badge which shows reCAPTCHA is in action.