### [Setting Up hCaptcha](https://wpforms.com/docs/how-to-set-up-and-use-hcaptcha-in-wpforms/)

**Published:** November 23, 2023
**Author:** Umair Majeed

**Excerpt:** Learn how to enable hCaptcha to help prevent spam submissions.

**Content:**

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.

This tutorial will show you how to set up and use hCaptcha in WPForms.

- [1. Generating hCaptcha Keys](#generate-keys)
    - [Adding a New hCaptcha Sitekey](#aioseo-adding-a-new-hcaptcha-sitekey-14)
    - [Copying Your hCaptcha Sitekey](#aioseo-copying-your-hcaptcha-sitekey-36)
    - [Configuring Additional hCaptcha Settings](#aioseo-configuring-additional-hcaptcha-settings-62)
- [2. Adding hCaptcha to a Form](#add-to-form)
- [3. Testing hCaptcha](#test)
- [4. Viewing Spam Entries](#view-spam-entries)
- [Frequently Asked Questions](#aioseo-frequently-asked-questions-99)

---

Before you dive in, make sure WPForms is [installed and activated](https://wpforms.com/docs/install-wpforms-plugin/) on your WordPress site and that you’ve [verified your license](https://wpforms.com/docs/verify-wpforms-license/).

### 1. Generating hCaptcha Keys

To get started, log in to your WordPress site and go to **WPForms » Settings**. Then click on the **CAPTCHA** tab.

![WPForms Captcha settings](https://wpforms.com/wp-content/uploads/2023/10/wpforms-captcha-settings.png "WPForms CAPTCHA Settings")To configure hCaptcha on your site, select the **hCaptcha** option.

![Select hCaptcha option](https://wpforms.com/wp-content/uploads/2023/10/select-hcaptcha.png "Select hCaptcha Option")Next, you’ll need to generate a new set of keys in your hCaptcha account to connect it to WPForms. Leave this browser tab open and proceed to the next step.

#### Adding a New hCaptcha Sitekey

To start this setup process, [log in to your hCaptcha account](https://dashboard.hcaptcha.com/login). Once you’ve logged in to hCaptcha, click the **Add Site** button in the upper right corner.

![Adding a new site to your hCaptcha account](https://wpforms.com/wp-content/uploads/2023/11/hcaptcha-add-site.png)This will open the setup form for your hCaptcha. If you’d like, you can add a name to this specific sitekey in the **Name** field under the **Basic Info** section. This is for your reference only, and won’t be seen by your users on the frontend.

![Naming your hCaptcha sitekey](https://wpforms.com/wp-content/uploads/2023/11/name-hcaptcha-sitekey.png)Then, under the **Domains** section, you can add the URL of each site you’ll be activating hCaptcha on.

![Adding domains for your hCaptcha sitekey](https://wpforms.com/wp-content/uploads/2023/11/hcaptcha-domains.png)Next, you’ll need to choose the default CAPTCHA behavior in the **hCaptcha Behavior** section. The **Always Challenge** mode is the default option. This setting will show a CAPTCHA challenge before users submit a form on your website.

![hcaptcha behavior](https://wpforms.com/wp-content/uploads/2022/11/hcaptcha-behavior.png "hcaptcha behavior")The **Passive** mode doesn’t display any challenge on the frontend. Instead, it uses a score to determine and prevent spam submissions on your form.

**Note:** You’ll need to upgrade your hCaptcha account to use the **Passive** and **99% Passive** modes.

Below that, you’ll see the **Passing Threshold** option. This setting allows you to choose the difficulty level of the hCaptcha within your forms. For example, if you choose the **Difficult** passing threshold, it’ll show harder challenges to users.

![hcaptcha-passing-threshold](https://wpforms.com/wp-content/uploads/2022/11/hcaptcha-passing-threshold-1.png "hcaptcha-passing-threshold")Go ahead and choose **Auto** for the passing threshold. Setting the threshold to Auto will vary the difficulty based on user behavior on your website.

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

![Saving your hCaptcha sitekey](https://wpforms.com/wp-content/uploads/2023/11/hcaptcha-save-button.png)#### Copying Your hCaptcha Sitekey

Next, you’ll be redirected to the Sites page where all your sitekeys will be listed. To quickly copy the sitekey you’ve just created, simply click on the name of your sitekey directly from the list.

![](https://wpforms.com/wp-content/uploads/2023/11/copy-sitekey-1.png)Alternatively, you can click anywhere on the sitekey’s row to open the detailed settings page. Once you’ve opened these settings, you can view your full sitekey under the **Sitekey** section. Click on the **Copy** icon to copy it.

![Copying your hCaptcha sitekey](https://wpforms.com/wp-content/uploads/2023/11/copy-sitekey.png)After you’ve copied it, head back to the WPForms settings page and paste your sitekey in the **Site Key** field.

![hCaptcha sitekey](https://wpforms.com/wp-content/uploads/2022/11/hcaptcha-site-key.png "hCaptcha sitekey")Next, you’ll need to copy and paste your Secret key from hCaptcha into your WPForms settings.

To get your Secret key, open the hCaptcha tab and click on your avatar in the top right corner of the screen to open your account menu. Then click on **Settings**.

![Opening your hCaptcha account settings](https://wpforms.com/wp-content/uploads/2020/12/hcaptcha-account-settings.png "Opening your hCaptcha account settings")Next, click on the **Generate New Secret** button from the **Secret** section on this screen.

![Get New Secret Key button](https://wpforms.com/wp-content/uploads/2023/11/generate-new-secret-hcaptcha.png)Next, click on the **Generate** button from the popup to generate a new secret key.

![Generate new secret key](https://wpforms.com/wp-content/uploads/2023/11/generate-secret-key-hcaptcha.png)Then, click on the **Copy Secret** button to copy the new secret key you just created.

![Copy secret key hcaptcha](https://wpforms.com/wp-content/uploads/2023/11/copy-secret-key-hcaptcha.png)Next, 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.

![hCaptcha secret key](https://wpforms.com/wp-content/uploads/2022/11/secret-key.png "hCaptcha secret key")#### 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.

![additional hCaptcha configurations](https://wpforms.com/wp-content/uploads/2023/10/hcaptcha-additional-settings.png "Additional hCaptcha Configurations")- **Fail Message:** This error will display to any user who does not pass hCaptcha’s verification test.
- **No-Conflict Mode:** If several CAPTCHAs are 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](https://wpforms.com/contact/) if you’re at all unsure whether to use this option.
- **Preview:** This setting will show a preview of your hCaptcha. 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 forms.

To do so, [create a new form](https://wpforms.com/docs/creating-first-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](https://wpforms.com/wp-content/uploads/2022/11/add-hcaptcha-field-to-form-builder.png "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](https://wpforms.com/wp-content/uploads/2022/11/enable-hcaptcha-on-form-builder.png "The hCaptcha badge in the form builder")Alternatively, you can always turn hCaptcha on or off for a form by going to **Settings » Spam Protection and Security** in the form builder.

![spam protection and security settings](https://wpforms.com/wp-content/uploads/2022/10/spam-protection-settings.png "spam protection and security settings")Under the **Protection** section, you can enable the **Store spam entries in the database** option if you’d like to review spam entries before deleting them from the entries page.

![Store spam entries in the database option](https://wpforms.com/wp-content/uploads/2023/07/store-spam-entries-in-database.png "Store Spam Entries in the Database Option")Enabling this option allows all submissions, including those flagged as spam by hCaptcha.

**Note:** The **Enable minimum time to submit** option helps prevent bot submissions by setting a minimum time before submissions are allowed on the form. See our [spam prevention](https://wpforms.com/docs/how-to-prevent-spam-in-wpforms/#minimum-time) guide for more details.

Next, scroll down to the **CAPTCHA** section and toggle the **Enable hCaptcha** option to the on position.

![Enabling hCaptcha in the form builder spam protection settings](https://wpforms.com/wp-content/uploads/2022/11/enable-hcaptcha.png "Enabling hCaptcha in the form builder spam protection settings")**Note:** If no badge appears in your form builder, ensure you’ve correctly [set up your hCaptcha keys](https://wpforms.com/docs/how-to-set-up-and-use-hcaptcha-in-wpforms/#generate-keys "How to Set Up reCAPTCHA in WPForms").

### 3. Testing hCaptcha

The last step is to run a quick test to ensure that hCaptcha looks and works how you expect.

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](https://wpforms.com/docs/how-to-properly-test-your-wordpress-forms-before-launching-checklist/).

### 4. Viewing Spam Entries

If you enabled the spam entry storage option, you’ll be able to view entries identified as spam from the Entries page.

There is also an option to recover entries that may have been mistakenly flagged as spam by hCaptcha.

![Spam detected by hCpatcha](https://wpforms.com/wp-content/uploads/2023/08/spam-detected-by-hcaptcha.png "Spam Detected by hCaptcha")For a detailed guide, please see our tutorial on [viewing and managing spam entries](https://wpforms.com/docs/viewing-and-managing-spam-entries/).

## Frequently Asked Questions

These are some of the most common questions that come up regarding hCaptcha.

#### hCaptcha isn’t showing the visual challenge in Safari. How can I fix this?

Safari’s privacy features, such as Intelligent Tracking Prevention, can block the cross-site requests hCaptcha needs to display its visual challenges. Ask your users to check that **Settings » Safari » Prevent Cross-Site Tracking** is not blocking hCaptcha. You can also try enabling **No-Conflict Mode** in your WPForms CAPTCHA settings to ensure no conflicting scripts are interfering. If the issue persists, consider switching to [Cloudflare Turnstile](https://wpforms.com/docs/setting-up-cloudflare-turnstile/) as an alternative, which tends to have better Safari compatibility.

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](https://wpforms.com/docs/how-to-create-an-allowlist-denylist-for-email-addresses-in-wpforms/) for more details.

**Categories:** Functionality, Spam Prevention and Security

---

