Note: While our most popular guides have been translated into Spanish, some guides are only available in English.
Adding Google reCAPTCHA to forms

To help reduce spam, add Google reCAPTCHA to Form Blocks and Newsletter Blocks. Google reCAPTCHA prompts visitors to check a box to prove that they’re not a robot before they submit the form. In some cases, they’re prompted to complete another task, like identify a string of letters. This method makes it difficult for spambots to complete form submissions.

To enable reCAPTCHA, you'll need a Google account. This integration uses reCAPTCHA V2.

Step 1 - Enable Google reCAPTCHA

Before you can add Google reCAPTCHA to Form Blocks and Newsletter Blocks, enable it in Advanced Settings:

  1. In the site Settings panel, click Advanced, and then External API Keys.
  2. Scroll down to Google reCAPTCHA.
  3. Click the link to get your Google reCAPTCHA API Keys. The link will open in a new tab.
  4. Click Admin Console, then select reCAPTCHA V2. Squarespace doesn't support reCAPTCHA V3.
  5. Select "I'm not a robot" Checkbox.
  6. Enter your built-in domain and click the + icon. Use the format yoursite.squarespace.com, excluding https:// from the beginning.
  7. Enter your custom domain and click the + icon. Repeat this step for any other custom domains connected to your site, excluding https:// from the beginning of each one.
Note: Ensure you add all domains associated with your site. Google reCAPTCHA won't work on any domains not added.

Creating a new reCAPTCHA in the Google reCAPTCHA dashboard.

  1. Click Submit.
  2. Copy your Site Key and Secret Key and paste them somewhere easily accessible.

The Site Key and Secret Key in the reCAPTCHA dashboard.

Note: API keys are sensitive. Keep these keys secure. Treat them like you would treat any password.
  1. Back in the External API Keys panel, paste your API keys.

The External API Keys panel in Squarespace.

  1. Click Save.

Step 2 - Add Google reCAPTCHA to a form

After you enable reCAPTCHA, you’ll see a Captcha tab in Form Block and Newsletter Block editors. To add Google reCAPTCHA to a form:

  1. In the Form Block or Newsletter Block editor, click Captcha, then check Add Google reCAPTCHA.
  2. Customize the theme and alignment using the drop-down menus.
  3. Click Apply.
  4. Repeat these steps for all blocks on your site where you want to add a reCAPTCHA.

The Captcha tab appears in a Form Block after adding reCAPTCHA API keys.

Here’s how Google reCAPTCHA will look on your block:

newCaptchaAnchor.gif

If you change your domain, update reCAPTCHA settings

Google reCAPTCHA only works with the domains you enter during the registration process. If you change your built-in Squarespace domain or connect a new domain to your site, you’ll need to add it to your API Key settings on Google. It can take up to 30 minutes for domain updates to take effect.

  1. In the Settings panel, click Advanced, and then External API Keys.
  2. Scroll down to Google reCAPTCHA.
  3. Click Google reCAPTCHA API Keys.

The link will open the Google reCAPTCHA site in a new tab.

  1. Click Admin Console.
  2. From the drop-down menu, select the reCAPTCHA you want to update.
  3. Click the in the top right corner.
  4. Add your new domain to the Domains list.
  5. Click Save.

Troubleshooting

Error message: Invalid domain for site key

If you don’t correctly add all your site's domains during Google reCAPTCHA registration, you’ll see an error that says ERROR for site owner: Invalid domain for site key.

To resolve, add the domain and refresh the page with the block It can take up to 30 minutes for domain updates to take effect.

Error message: Invalid key type

If you select reCAPTCHA V3 during Google reCAPTCHA registration, you'll see an error that says ERROR for site owner: Invalid key type. Squarespace doesn't support reCAPTCHA V3.

To resolve, create a new reCAPTCHA by clicking the icon in the top right corner of your Google reCAPTCHA dashboard and select reCAPTCHA V2 during creation. Then add the new keys to the External API Keys panel on Squarespace and click Save.

Error message: Unable to submit form. Please try again later

If you inadvertently copy additional text into the Secret Key field in your Squarespace site's settings, you'll see an error when trying to submit the Form Block or Newsletter Block that says Unable to submit form. Please try again later.

To resolve, copy the Secret Key from the reCAPTCHA dashboard, ensuring only the Secret Key text gets copied, then paste it in the Secret Key field of the External API Keys panel in your Squarespace site.

Checking Google reCAPTCHA sends visitors to the bottom of the page

On iOS devices, checking the Google reCAPTCHA box sends visitors to the bottom of the page. This is caused by an issue between iOS and Google, and isn't something we're able to resolve.

Was this article helpful?
104 out of 149 found this helpful
Adding Google reCAPTCHA to forms