You have built a website using WordPress, including a contact form. You expected that your customers would contact you to do some business, but that hasn’t happened.
You got a ton of spamming emails instead.
There needs to be a way to protect against that. Luckily there is a free solution for the problem, which is also easy to implement.
The solution is hCaptcha.
Why should you use hCaptacha?
Some of the reasons are:
- It is a free tool, as said before
- hCaptcha is a world-class bot protection
- You can earn money when people solve Captcha’s
- hCaptcha doesn’t have any country restrictions
- It complies with GDPR, CCPA, LGPD, PIPL, and more
If you decide to purchase to buy a pro license you will get even more protection.
You can read more about that on their website.
Let’s go back to the tutorial, shall we?
In this tutorial I will show you how to add a hCaptcha to 2 of the most used WordPress contact forms plugins:
- Contact form 7, and
- Wp forms
1. how to add a hCaptcha in contact form 7
I guess that you have contact form 7 already installed, so our next step will be to register on the hCaptcha website.
After that choose option:
Add hCaptcha for Publishers to my website or app
You will be redirected to the sign-up page. Choose the option you like and register.
After you have successfully registered your dashboard.
Now you can start adding your sites.
To add a new site scroll down until you see the button “New site” on the right side of the panel. Click on it.
- Add a site key name ( in case you add more sites later to know which site is)
- Host name (add this without https::// For example brilex007.com)
- Save
We are done with the hCaptcha website for now. We will be back later to take a site key and the secret key. Before that, we need to install a plugin that will enable hCaptcha on the contact form.
Search for hCaptcha for the WordPress plugin, and install and activate it.
Search for hCaptcha in settings. As you can see we need a site key and a secret key for this to work.
Go back to the hCaptcha website, click on the “Sites” in the nav menu, find your site, and click on the site key to copy it. Or click on the settings and copy button under the site key.
To get the secret key click on the user icon on the right, and click settings. Find your secret key and copy it.
Paste your site key and the secret key in the settings of the wp hCaptcha plugin, and save the changes.
Next click on the integration tab, enable hCaptcha on contact form 7, and save it.
After that check your contact form on the website. It should look like this:
Test your form. If is everything ok you should be protected from spamming and robots in the future.
2. How to add a hCaptcha in the Wp form plugin
You can integrate hCaptcha in the wp form plugin using the same plugin as we have used for contact form 7, but there is a better way and we don’t need any additional plugins.
Here is the way we do that:
Find wp forms in the wp menu, click on the settings, and choose CAPTCHA from the tab.
Click on the hCaptcha, additional options will show up.
Paste your site key and secret key you got from hCaptcha, and save.
After you have added the keys go to the form settings, find hCaptcha in the bottom right, and click on it.
After that, you should get a confirmation pop-up.
Don’t forget to save your settings.
Check your contact form, the hCaptcha should be there if you have configured it correctly.