Setting Up hCaptcha

Would you like to set up hCaptcha to help prevent spam submissions in your WordPress forms? hCaptcha is a free, privacy-conscious alternative to Google’s reCAPTCHA that offers reliable anti-spam protection.

In this tutorial, we’ll show you how to set up and use hCaptcha in WPForms.

  1. Generating hCaptcha Keys
  2. Adding hCaptcha to a Form
  3. Testing Captcha

Before you dive in, make sure WPForms is installed and activated on your WordPress site. You’ll also need to verify your license and create your first form.

1. Generating hCaptcha Keys

To get started, log in to your WordPress site and go to WPForms » Settings. Then click on the CAPTCHA tab. To configure hCaptcha on your site, be sure the hCaptcha option is selected.

Captcha tab in WPForms

Next, you’ll need to generate a new set of keys in your hCaptcha account to connect it to WPForms. To start this setup process, log in to your hCaptcha account.

Adding a New hCaptcha Sitekey

Once you’ve logged in to hCaptcha, click the New Site button in the upper right corner.

Adding a new site to your hCaptcha account

This will open the setup form for your hCaptcha. If you’d like, you can add a name to this specific sitekey under the Add New Sitekey section by clicking the pencil icon. This is for your reference only, and won’t be seen by your users on the frontend.

Naming your hCaptcha sitekey

Then, under General Information, configure additional settings for your CAPTCHA. We’ve outlined each of these settings below.

Editing the general information for your hCaptcha sitekey

  • Hostnames: Here you’ll add the URL of each site you’ll be activating hCaptcha on.
  • Captcha difficulty: This setting allows you to choose the difficulty level of the hCaptcha within your forms. Setting a lower difficulty level means your users will be presented with an image challenge less often than if you set a higher difficulty level.

Once you’ve configured your settings, be sure to click the Save button at the top of the screen to save your settings.

Saving your hCaptcha sitekey

Copying Your hCaptcha Sitekey

Next, you’ll be redirected to your sitekey’s settings. To view and copy your entire sitekey, click the Settings button to view more details.

Opening the settings for your hCaptcha sitekey

Once you’ve opened these settings, you can view your full sitekey under the Sitekey section. Click on Copy to copy it.

Copying your hCaptcha sitekey

Then paste your sitekey into your WPForms settings in the Site Key field.

Next, you’ll need to copy your Secret key from hCaptcha into your WPForms settings as well. Go ahead and close out of your sitekey settings (which you can do by clicking the Save button) to return to your sitekey overview.

Next, click on your avatar in the top right corner of the screen to open your account menu and select Settings.

Opening your hCaptcha account settings

Then copy your secret key from the Secret key section on this screen.

Copying your hCaptcha secret key

Go ahead and paste this secret key into your WPForms settings. Be sure to click the Save Settings button to save your keys when you’re done.

Configuring Additional hCaptcha Settings

Once you’ve added your keys, you can also optionally adjust other hCaptcha settings. We’ve outlined each available option below.

  • Fail Message: This error will display to any user who does not pass hCaptcha’s verification test.
  • No-Conflict Mode: If there are several CAPTCHAs being loaded on your site (for example, by both WPForms and your WordPress theme), this can prevent hCaptcha from working properly. No-conflict mode will remove any CAPTCHA code that’s not loaded by WPForms. However, we highly recommend getting in touch with our support team if you’re at all unsure whether to use this option.
  • Preview: This setting will show a preview of your hCaptcha on the frontend. If any of your settings are configured incorrectly, you’ll see an error message in the preview. This means you should double-check that your keys are copied correctly in your settings.

2. Adding hCaptcha to a Form

Now that you’ve set up your keys, you’ll be able to add hCaptcha to any of your WPForms.

To do so, create a new form or edit an existing one. After you’ve opened the form builder, look under Standard Fields and click on the hCaptcha field.

Adding hCaptcha to a form

To confirm that hCaptcha is enabled, look for the badge in the upper right corner of the form builder.

The hCaptcha badge in the form builder

Additionally, you can always turn hCaptcha on or off for a form by going to Settings » General in the form builder and toggling the Enable hCaptcha option.

Enabling hCaptcha in the form builder general settings

3. Testing hCaptcha

The last step is to run a quick test to make sure that hCaptcha looks and works how you’re expecting.

To test it out, you’ll simply need to submit an entry to your form. For more details on how to test out your forms, please take a look at our full testing checklist.

That’s it! Now you know how to set up and use hCaptcha in WPForms.

Next, would you like to block users with certain email addresses from submitting your forms? Be sure to check out our tutorial on how to create an allowlist or denylist for more details.