---
title: "Securing forms on the website"
canonical_url: "https://www.zone.lv/help/kb/securing-forms-on-the-website/"
post_type: "ht_kb"
published: "2024-11-15T14:32:54+00:00"
modified: "2025-12-30T10:26:59+00:00"
language: "en"
author: "Tanel"
taxonomies:
  ht_kb_category:
    - name: "Security"
      url: "https://www.zone.lv/help/kb-categories/security/"
    - name: "Wordpress"
      url: "https://www.zone.lv/help/kb-categories/wordpress-en/"
  ht_kb_tag:
    - name: "Captcha"
      url: "https://www.zone.lv/help/kb-tags/captcha-en/"
    - name: "Cloudflare Turnstile"
      url: "https://www.zone.lv/help/kb-tags/cloudflare-turnstile-en/"
    - name: "Google reCAPTCHA"
      url: "https://www.zone.lv/help/kb-tags/google-recaptcha-en/"
    - name: "reCAPTCHA"
      url: "https://www.zone.lv/help/kb-tags/recaptcha-en/"
---

# Securing forms on the website

## Why is it important to protect all forms on a website?

- **Reducing Spam:** Bots can easily fill out unprotected forms, resulting in large amounts of spam being sent from your website to various mailboxes.
- **Maintaining Data Accuracy:** Bots can input incorrect data, which interferes with real user data and complicates user management.
- **Enhancing Security:** CAPTCHA solutions protect forms from malicious attacks, such as brute-force attacks on login forms, which could lead to account hijacking.
- **Saving Server Resources:** Spam attacks consume server resources and can slow down the website, negatively affecting user experience.

## Protecting WordPress Website Forms

### Cloudflare Turnstile

**Step 1**

Before protecting forms using Cloudflare Turnstile, create a Cloudflare account or log in to an existing one.
Start the account creation process [here](https://www.cloudflare.com/application-services/products/turnstile/) by clicking the “Get started for free” button.

Once the account is ready, you’ll be redirected to the Cloudflare dashboard, where you need to navigate to the `Turnstile` management section.

![](https://www.zone.lv/static/sites/5/ENGturnstile1.png)

**Step 2**

In the Turnstile management section, add a new CAPTCHA widget.

![](https://www.zone.lv/static/sites/5/ENGturnstile2.png)

**Step 3**

Give the widget a name. This name is only visible in the Cloudflare dashboard.

![](https://www.zone.lv/static/sites/5/ENGturnstile3.png)

**Step 4**

Specify all the domains allowed to use this widget.
**Note:** If you want to set up Turnstile for a subdomain, include the subdomain name in this step. You can add up to 10 (sub)domains to one widget.

![](https://www.zone.lv/static/sites/5/ENGturnstile4.png)

**Step 5**

After adding all (sub)domains to the hostnames list, click the `Add` button.

![](https://www.zone.lv/static/sites/5/ENGturnstile5.png)

**Step 6**

Review the settings to ensure they’re correct before creating the widget.
Leave the `Widget Mode` as “Managed,” which automatically decides whether to display the CAPTCHA based on visitor behavior.

![](https://www.zone.lv/static/sites/5/ENGturnstile6.png)

**Step 7**

Once the widget is created, you’ll see a `Site Key` and `Secret Key` pair. These will be needed in the next step to integrate the widget with your website. You can always access or regenerate these keys in the Cloudflare dashboard.

![](https://www.zone.lv/static/sites/5/ENGturnstile7.png)

**Step 8**

Open the WordPress dashboard and install the [Simple CAPTCHA Alternative with Cloudflare Turnstile](https://wordpress.org/plugins/simple-cloudflare-turnstile/) plugin, then open its settings and input the `Site Key` and `Secret Key` from the previous step.

![](https://www.zone.lv/static/sites/5/ENGturnstile8.png)

**Step 9**

Scroll down to select all the forms you wish to protect. You can also protect forms from other plugins in addition to WordPress’s own forms.

After making your selections, click `Save Changes`.

![](https://www.zone.lv/static/sites/5/ENGturnstile9.png)

**Step 10**

Click the green `TEST RESPONSE` button that appears on the screen after saving changes. If the test is successful, the CAPTCHA will be activated on the previously selected forms. If it fails, double-check the `Site Key` and `Secret Key`.

![](https://www.zone.lv/static/sites/5/ENGturnstile10.png)

**Step 11**

Test the implementation.
WordPress login form: `https://yourdomain.com/wp-login.php`
WordPress registration form: `https://yourdomain.com/wp-register.php`

You should now see the Cloudflare Turnstile widget displayed on the forms.

![](https://www.zone.lv/static/sites/5/ENGturnstile11.png)

### Google reCaptcha

**Step 1**

To protect forms with Google reCAPTCHA, log in to the [Google reCAPTCHA dashboard](https://www.google.com/recaptcha/about/).

![](https://www.zone.lv/static/sites/5/ENGrecapctha0.png)

**Step 2**

After logging in, you’ll be able to create a new CAPTCHA. Assign a label, such as your domain name.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha1.png)

**Step 3**

Select `Score based (v3)` as the CAPTCHA type.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha2.png)

**Step 4**

Specify the domain name that will use the CAPTCHA.
**Note:** Unlike Cloudflare Turnstile, subdomains do not need to be specified separately for Google reCAPTCHA.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha3.png)

**Step 5**

Give a name to the project.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha4.png)

**Step 6**

Read through and agree to the Google reCAPTCHA terms.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha5.png)

**Step 7**

Click `SUBMIT`.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha6.png)

**Step 8**

You’ll see a `Site Key` and `Secret Key` pair on the next screen. These will be used in the next step to integrate reCAPTCHA with your website. You can view these keys anytime in the Google reCAPTCHA dashboard.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha7.png)

**Step 9**

Now that the API keys have been made, install a Google reCAPTCHA plugin on your website.

In this example. we will be installing and configuring the [Advanced Google reCAPTCHA](https://wordpress.org/plugins/advanced-google-recaptcha/) plugin.

Open the plugin settings and select `Google reCAPTCHA v3` as the CAPTCHA type.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha10.png)

**Step 10**

Enter the `Site Key` and `Secret Key` in the respective fields. Click `Verify Captcha` to ensure the keys are correct.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha11-1.png)

Click `Submit Captcha` in the popup window to complete the verification.

![](https://www.zone.lv/static/sites/5/recaptcha12.png)

Captcha is successfully verified.

![](https://www.zone.lv/static/sites/5/recaptcha13.png)

**Step 11**

Click `Save Changes` to save the configuration.

![](https://www.zone.lv/static/sites/5/recaptcha14.png)

**Step 12**

Under the `Where To Show` tab, select which forms should be protected by the CAPTCHA.

![](https://www.zone.lv/static/sites/5/recaptcha16.png)

**Step 13**

Test the implementation.

- WordPress login form: `https://yourdomain.com/wp-login.php`
- WordPress registration form: `https://yourdomain.com/wp-register.php`

You should see the Google reCAPTCHA logo in the bottom-right corner of the website.

![](https://www.zone.lv/static/sites/5/ENGrecaptcha15.png)
