Articles on: Forms

How to activate reCAPTCHA

In this guide, you will learn how to add reCAPTCHA to your Unicorn Platform website without writing any code.

Suspicious submission attempt blocked by reCAPTCHA

reCAPTCHA is a free service by Google that protects your contact forms from spam.

Unicorn Platform provides Challenge (v2) integration. It will not interrupt your visitors unless their behaviour is considered suspicious.

Before we get started, please make sure that you:

Upgraded your Unicorn Platform account to the Startup plan or higher.
Have a Google account.

Table of contents:

Step 1 – Register your website
Step 2 – Add the site key
Step 3 – Add the secret key
Troubleshooting
Privacy

Step 1 – Register your website



To get started with reCAPTCHA
visit the Admin Console.
Choose the type: reCAPTCHA v2 > Invisible reCAPTCHA badge.

The required type of reCAPTCHA

Add all domain names associated with your website.

Domain registration field

reCAPTCHA detects subdomains automatically. For example, if you add mysite.com to the domain list, reCAPTCHA will also work for www.mysite.com, blog.mysite.com, etc.

Carefully read reCAPTCHA's Terms of Service before accepting and press Submit.

Terms of Service by reCAPTCHA

And finally, copy the provided site key.

The site key field

Step 2 – Add the site key



To activate reCAPTCHA for your website, go to the page editor. Start editing any component that contains a contact form and press Activate reCAPTCHA.

reCAPTCHA activation button

Enable reCAPTCHA and paste the site key that you copied previously.

reCAPTCHA configuration menu

reCAPTCHA configuration is global. It means that changes made for 1 form will be applied to every other form on your website automatically.

Now save changes and open the live version of your website to see the result. If everything is configured correctly, you should see a small "protected by reCAPTCHA" badge at the bottom right corner.

reCAPTCHA badge

Step 3 – Add the secret key



After you’ve entered the site key, reCAPTCHA will start to verify user requests on the client side. For maximum security, you also need to enable server-side verification by using the secret key.

To do so, go to your reCAPTCHA Admin Console > Settings, and copy the secret key.

The secret key field

Then go back to Unicorn Platform and paste the key into the second field.

Pasted secret key

Save changes and open the live version of your website. Try to submit a form to make sure that everything is configured properly. If the secret key is entered correctly, the form will be submitted successfully.

If there are issues with your secret key, you will see an error message when trying to submit a form. Please see the next chapter to learn how to handle this error.

A Security Preference slider allows you to adjust the security preference for the site.
Value of the slider ranges from "Easiest for users" to "Most secure".



Troubleshooting



If for some reason reCAPTCHA doesn't work properly, the badge should contain an error message. This message will allow you to identify and fix the issue.

Example of an error message

Here are some of the most possible issues.

reCAPTCHA badge doesn't appear on your website


Please make sure that you've enabled reCAPTCHA, entered the site key, and didn't hide the badge.

Basic reCAPTCHA configuration

We suggest that you keep the badge visible until you make sure that reCAPTCHA is working properly. You can hide it later at any time.

"ERROR for site owner: Invalid site key"


This issue happens when the site key that you've entered is incorrect. To fix it:

Go to your reCAPTCHA Admin Console > Settings, and copy the site key again.

reCAPTCHA site key

Paste it into the site key field.

Pasted site key

Make sure that you saved the changes.

"Save changes" button

"ERROR for site owner: Invalid domain for site key"


This error appears when the registered domains are incorrect. To fix it:

Go to your reCAPTCHA Admin Console > Settings.
Make sure that you've entered the correct domain names, and add the new ones if necessary.

Domain registration field

[’invalid-input-secret’]


If there are issues with your secret key, you will see the following error when trying to submit a form.

The secret key error message

To fix it:

Go to your reCAPTCHA Admin Console > Settings, and copy the secret key again.

reCAPTCHA secret key

Paste it into the secret key field.

Pasted secret key

Make sure that you saved the changes.

"Save changes" button

Privacy



By activating reCAPTCHA on your website, you allow Google to collect the personal information of your visitors. Google's Privacy Policy and Terms of Service apply.

Please explicitly inform your users that the website is protected by reCAPTCHA, and update your Privacy Policy if necessary.

Updated on: 12/03/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!