Want to stop spammers from filling out your forms? Google’s reCAPTCHA allows you to add human verification technology to your forms.
ReCAPTCHA is a free service provided by Google. There are two versions of reCAPTCHA available for your forms:
Checkbox reCAPTCHA: The user must check a box to confirm that they are human.
Note: Each reCAPTCHA type requires a different set of keys, so if you later decide to switch types you will need to generate a new set of keys.
Step 1. Set up
To set up reCAPTCHA in your Google account to get the required keys, you’ll need to open Google’s reCAPTCHA overview page.
Once you’ve opened this page, you’ll need to click the Admin console button in the upper right corner to get started.
After clicking this button, you’ll be asked to sign into your Google account. What you see on login will depend on whether you’ve set up reCAPTCHA with this account before.
If you have set up a reCAPTCHA with this account in the past, you’ll need to click the + (plus) icon to add a new site.
If you’ve never set up reCAPTCHA before, you’ll be directed straight to the reCAPTCHA setup form.
Below, you’ll find more details on how to fill out each field in this form.
- Label: This is just for you, so enter any name that makes logical sense (most commonly the website name).
- reCAPTCHA Type: Select reCAPTCHA v2, then choose either “I’m not a robot” Checkbox or Invisible reCAPTCHA badge.
- Domains: Enter the URL where you’ll be using reCAPTCHA. Do not include “http://www” at the start (for example, spectora.com would be accepted but https://spectora.com or www.spectora.com would not be accepted).
- Owners: Unless you know a specific reason to adjust this, you can skip this setting.
- Accept the reCAPTCHA Terms of Service: You must check this box to proceed.
- Send alerts to owners: Unless you know a specific reason to turn this off, you can leave this box checked.
Once the form is complete, go ahead and click the Submit button.
After registering, you should see a page with the keys for your website.
Step 2. Add reCAPTCHA to your website
If you're on Managed hosting, send your site key and secret key to firstname.lastname@example.org. We'll take care of the rest!
If you're on DIY hosting, you’ll need to copy the Site Key and Secret Key. Then switch back to your WordPress site to paste these keys into their corresponding fields in your contact form plugin.
If you're not sure which contact form plugin your site is using, navigate to the page(s) on your site with the contact form while logged in, then click on Edit Page at the top of the screen. Then, scroll down to the layout builder where your contact form should appear. In the layout grid, you will either see Contact Form or Code Block like this:
If you see Contact Form, you will need to contact our support team to update your contact form to a more secure version. Email email@example.com
If you see Code Block, click it. You should see something along the lines of:
[wpforms id="1433" title="false" description="false"]
If you see something that starts with [wpforms that means your website is using the WP Forms contact form.
If you see something that starts with [forminator that means your website is using the Forminator Pro contact form.
**Adding reCAPTCHA to WP Forms**
Now that you’ve set up your reCAPTCHA keys in Google, you need to add reCAPTCHA to your WPForm(s).
To do this, navigate to WPForms on the leftside menu and click edit on your form.
You’ll need to copy the Site Key and Secret Key from Google and paste these keys into their corresponding fields.
Be sure to remember to click on the Save Settings button at the bottom of this page to store these changes.
After you’ve opened the form builder, go to Settings » General and check the box labeled Enable Google Checkbox v2 reCAPTCHA or Enable Google invisible v2 reCAPTCHA.
**Adding reCAPTCHA to Forminator Pro**
Go to Forminator Pro> Settings > Google reCAPTCHA
Add your site key and secret key, choose your site language and a theme and push the save settings button.
If you set up the reCAPTCHA successfully, it will appear in the connection test, like so:
This will create reCAPTCHA field so you can add it your Forms (like any other Form field).
Now go to Forminator Pro > Forms > Edit > Insert Fields. Choose reCaptcha and click Insert Fields.
Then at the top right of your screen click the blue Update button. This updates the form on your site.
Step 3. Test
The last step is to run a quick test to make sure that reCAPTCHA looks and works how you’re expecting.