> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Protect your forms from spam with reCAPTCHA

> Connect Google reCAPTCHA v3 keys so forms on your custom domain stay protected from spam, and see how the 20-submission allowance works.

Webfast checks every form submission for spam with Google reCAPTCHA v3, which scores visitors in the background, so nobody has to solve a puzzle. Websites on a Webfast address are protected for you. A website on your own custom domain needs its own reCAPTCHA keys, and this guide shows you how to create and connect them.

## Which websites need keys

* **Webfast addresses** (`yoursite.by.webfast.ai`) use built-in protection. You don't need your own keys.
* **Custom domains** need their own reCAPTCHA v3 keys. Until you add them, forms on the domain can receive a limited number of submissions (see [the 20-submission allowance](#the-20-submission-allowance)).

## Create your keys

**1. Open the reCAPTCHA admin console**

Go to the [Google reCAPTCHA admin console](https://www.google.com/recaptcha/admin) and sign in with your Google account.

**2. Name the key**

Enter a label you'll recognise, such as your business name.

**3. Choose score-based keys**

Select **Score based (v3)**. Don't choose the v2 checkbox option.

**4. Add your domain**

Enter your domain without `https://`, a path or `*.`. For example, `example.com` also covers `www.example.com` and your other subdomains.

**5. Finish Google's registration**

Select or create the Google Cloud project the console asks for, then complete Google's registration steps.

**6. Copy both keys**

Copy the **site key** and the **secret key**. You need the v3 site key and its secret, not a Google Cloud API key.

> [!TIP]
>
> If Google Cloud doesn't show a secret key, open the key's integration or legacy secret settings to find it.

## Connect the keys to your website

**1. Open Form Settings**

Open your website, click **Settings**, then choose **Form Settings**.

**2. Choose Spam Protection**

Select the **Spam Protection** tab.

**3. Paste your keys**

Paste the **Site key** and **Secret key**, then click **Save Changes**.

**4. Test on your custom domain**

Send a test submission from your live custom domain. Your Webfast address uses built-in protection, so a test there doesn't check your own keys.

> [!NOTE]
>
> Your secret key is stored encrypted. When you reopen Form Settings, you only see whether a secret is saved. Leave the field blank to keep the saved secret.

## The 20-submission allowance

A custom domain without reCAPTCHA keys can receive **20 submissions in total**, across all forms on that website.

* The **Forms** tab shows how many submissions are left and links to Form Settings.
* Notification emails also remind you to connect reCAPTCHA.
* After 20 submissions, forms on that custom domain pause until you connect valid keys.
* Deleting forms or disconnecting keys doesn't reset the allowance.

Websites on a Webfast address keep using built-in protection and have no allowance.

## Troubleshooting

> [accordion] Setup required
>
> Save both the site key and the secret key for the custom domain.

> [accordion] Invalid domain or site key
>
> Check that the key is a v3 (score-based) key and that it includes the domain your visitors use.

> [accordion] Verification failed
>
> Refresh the page and try again. Each verification token expires quickly and works only once. Browser extensions that block Google scripts can also stop verification.

> [accordion] You changed your domain
>
> Add the new domain to your key in the reCAPTCHA admin console before you test.

> [!WARNING]
>
> Don't turn off Google's domain verification for your key. Webfast also checks that each token belongs to your website and to a form submission.

## Related

* [Setting up forms](https://docs.webfast.ai/tutorials/setting-up-forms.md)
* [Get form submissions by email](https://docs.webfast.ai/tutorials/form-email-notifications.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.