Kit Blogs

reCAPTCHA on Contact Forms in WordPress

How To Use ReCAPTCHA to Block Spam On Your WordPress Contact Forms

This site contains affiliate links, meaning, at no additional cost to you, Kit Blogs will earn a commission if you click on some links and make a purchase. Click to see the Disclaimer.

As bloggers, we all know about spam. Spam comments, spam emails, spam everything. But how do you lessen the number of hits you get every single day from spam sites and people?

By adding reCAPTCHA to your forms, you can reduce the amount of spam you receive from bots (non-humans).

What Is Spam?

In case you are new to all of this spam stuff, let’s talk a little about spam.

Spam is a term used to signify unwanted submissions on your site – this can be emails you receive, comments people leave on your blog, and any way that you have provided for your readers to use and contact you on your blog.

Spammers can be individual people trying to take advantage of you or merely spread their links everywhere and anywhere for traffic. There are many other means of spam, but we are talking contact forms, right?

Spam can also come from what many term “bots”. These are programs online that automatically search for and then submit comments, send emails, or fill out online contact forms, all without an actual person typing.

What is reCAPTCHA?

reCAPTCHA is a way to help you reduce spam by verifying that the submission is completed by a human, not a bot.

The original reCAPTCHA from Google was a text entry – the form displays a jumble of letters and numbers that the person must decipher and type into the form before submission.

This may still be used on many sites…but it is a challenging way for individuals to verify they are human. Some are nearly impossible to read and it takes many tries to get the letter and number combinations correct (for any human!).

Google reCAPTCHA v2 screenshot

Then, Google released another version (that is referred to as v2) where the user merely checks a box (which requires a mouse or tap on a smartphone, something bots cannot do).

The updated reCAPTCHA was released in 2018 which uses a more advanced behind-the-scenes scoring system created by Google (some call it v3) that is invisible to the individual or has interactive checkboxes (I’m sure you have all seen the “check all the boxes with bridges” kind of interaction – not fun and not easy sometimes).

For the sake of this article, I will be focusing on the most common one used (v2).

What can use reCAPTCHA?

Before you download a contact plugin, check to see if it offers reCAPTCHA as extra security. Some do and some don’t have it available.

If you want to block spam comments on your blog using reCAPTCHA (see below for some other options), download the free plugin. Check out how to use the plugin here.

There are also other anti-spam plugins that can help you block spam. See my plugins post for details.

Should everyone use reCAPTCHA?

There is a lot of debate on using reCAPTCHA on your forms or submission types.

For many readers, reCAPTCHA can be incredibly annoying (especially the v1 and v3 versions).

For many (myself included), including reCAPTCHA makes the user experience challenging so it is not used.

BUT, there are many (especially blogs with huge traffic) that almost need this form of added security due to the massive amount of spam they receive on a daily basis.

So, you are more than welcome to add reCAPTCHA to your forms – check them out and see if it is easy to understand and pass the “I’m human” test for your readers.

Web Hosting

How to add reCAPTCHA to your contact forms

Since every plugin is different, I’m going to use WPForms as an example of how to add reCAPTCHA to your forms. If you use a different form, check their documentation on how to install this on their forms.

For brevity, I will assume you already have WPForms installed on your site.

Need help on how to install a plugin on your site? Check out this article.

1. Create A Simple Contact Form in WordPress

Since this article is about reCAPTCHA, see how to create a form in WPForms here.

Sample contact form with WPForms

2. Configure reCAPTCHA Settings

Go to WPForms > Settings. Then, click on the reCAPTCHA tab.

On the reCAPTCHA tab, choose “v2 reCAPTCHA” to add the interactive reCAPTCHA box to your contact form.

WPForms screenshot of reCAPTCHA settings

3. Create a reCAPTCHA Site Key With Google

reCAPTCHA is a service that is provided by Google.

While this service is free, you do need to generate a site key and secret key to use it on anything for your site.

Go the the reCAPTCHA setup page to get started.

Once there, click on Admin console in the upper right-hand corner.

Google reCAPTCHA Admin console button location screenshot

Then, sign in to your Google account (try to use the same one for each of your blogs – if you already use an account for Google Analytics, use the same one – this is just a tip not a requirement!).

After you log in, you’ll be redirected to a page where you can register your site.

If you have previously registered a site, just click on the + (plus) button to add a new one.

Adding a new site to reCAPTCHA with previous sites already registered screenshot

If you are new to reCAPTCHA, a form will automatically pop up.

Fill out the form with your site URL (permalink/domain) or just the name of your blog (this is for identification only – you will enter the URL later).

New site registration with reCAPTCHA screenshot

Then, choose the type of reCAPTCHA you want to add to your site. As I mentioned, we will go with the v2 of reCAPTCHA in this illustration.

Selecting the type of reCAPTCHA you want to register on your site screenshot

Next, fill out your site’s domain (permalink/URL), like example .com.

To save, just click on Submit.

Entering your domain when registering on reCAPTCHA screenshot

The next page will show you the site key and secret key to use on your plugin (in this case WPForms).

Head back to the WPForms plugin at WPForms > Settings (then to the reCAPTCHA tab) and copy/paste the site key and secret key in the provided fields.

Make sure to Save Settings at the bottom of the page.

4. Add reCAPTCHA to Your Contact Form

You did it!

You are all set up to add reCAPTCHA to any form you create through your plugin (in this case, WPForms).

To enabble reCAPTCHA in the form you created earlier, merely go to Settings > General in the form editor.

At the bottom of the screen check the box to “Enable Google checkbox v2 reCAPTCHA”.

WPForms Enable reCAPTCHA screenshot

Then click “Save” in the upper right-hand corner.

DONE!

Now all you need to do is insert the form on your site (see the plugin documentation on how to do this).

But with WPForms, this is what will display on a published page with the form you created:

WPForms on a published page or post showing reCAPTCHA v2 displaying screenshot

WPForms Custom Captcha Addon

There is an option from WPForms if you don’t want to use reCAPTCHA.

Learn more about the addon here.

The addon basically allows you to create unique questions and answers that a person must enter to submit the form. Here is an example:

Example of the WPForms Captcha Addon screenshot

Conclusion

reCAPTCHA is a great option for helping you to reduce the amount of spam you receive on your site. The best thing you want to do is protect yourself BUT provide the best user experience you can for your readers.

So, choose methods (like reCAPTCHA or the WPForms Capcha Addon) that help YOU and make it easy for your readers who want to interact with you and your content EASY.

Was this helpful? Share it with others!

Block spam with reCAPTCHA on your contact forms Pinterest image

Was this helpful? Share it!

12 thoughts on “How To Use ReCAPTCHA to Block Spam On Your WordPress Contact Forms”

  1. My partner and I stumbled over here coming from a different web address and thought I might
    check things out. I like what I see so now i am following you.
    Look forward to finding out about your web page again.

  2. Hi there! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing many
    months of hard work due to no backup. Do you have any methods to stop hackers?

    1. I’ve never had any problems with hackers yet. I would suggest making sure you have a good, strong password on your blog. I also use Wordfence and plugins for Anti-Spam that really help!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top