This website uses cookies in order to offer you the most relevant information and services online. Please accept cookies for optimal performance.
Learn More

Add reCAPTCHA to Contact Form 7 in WordPress

This article explains how you can add reCHATCHA to contact form 7 in WordPress. Google reCAPTCHA is a free service to protect your website from spam and abuse, letting real people pass through with ease.

Contact Form 7 is the most popular contact form plugin for WordPress. Combining these two, you can easily create WordPress contact forms with anti-spam protection. In this article, we shall guide you through how to integrate reCAPTCHA to Contact Form 7 in your WordPress website.

Note: It is assumed that you have created a Contact Page with Contact Form 7 in WordPress.

Get the reCAPTCHA public and secret keys

To get started with reCAPTCHA, you need a Google account and to register your website for an API key pair. To generate reCaptcha public and secret keys for your domain name, follow the steps mentioned below.

Go to the Google reCaptcha website.

Figure 1
Figure 1

Click the 'Get reCAPTCHA' button as shown in Figure 1.

Enter your website details such as 'Label, Domain and Email Owner(s)' and click on the 'Register' button as shown in Figure 2.

Figure 2
Figure 2

Upon doing so, you can see the generated 'Site Key' and 'Secret Key' as shown in Figure 3.

Figure 3
Figure 3

Copy the key pair into the WordPress Dashboard of the website you registered.

Integrate reCaptcha with Contact Form 7

To integrate reCaptcha with Contact Form 7, follow the steps mentioned below.

Go to the WordPress Dashboard menu 'Contact > Integration' as shown in Figure 4.

Figure 4
Figure 4

Find reCAPTCHA panel and click 'Configure Keys' as shown in Figure 5.

Figure 5
Figure 5

Enter the 'Site Key' and 'Secret Key' into the fields and save them as shown in Figure 6.

Figure 6
Figure 6

Edit the Contact Form

To put a placeholder for a reCAPTCHA widget into your contact form content, follow the steps mentioned below.

Paste the shortcode [recaptcha] to render the reCaptcha field just before the submit button as shown in Figure 7.

Figure 7
Figure 7

Click the 'Save' button as shown in Figure 7.

Preview the contact page. It should look like the one shown in Figure 8.

Figure 8
Figure 8

Give your feedback to improve the article

Latest Product Updates

Get the latest news and updates about Batoi Products - articles and product releases.

Need our assistance? We are available with you.

Existing Customer?
Get Support
Talk To Consultant?
Get An Appointment
Contact Us

Batoi global offices and contact details

Stay Connected

Join our community, newsletters, and social media.

Batoi's Annual Cloud Conclave is coming soon. Please watch out.