Plesk

How to create a Google reCAPTCHA

Google reCAPTCHA is an effective tool for preventing bots from attempting to guess usernames and passwords or sending spam via contact forms on your site. To set up reCAPTCHA, you need to register your domain with Google reCAPTCHA.

REGISTERING RECAPTCHA WITH GOOGLE

(STEP 1) Visit the reCAPTCHA website and click the blue "My reCAPTCHA" button located in the top-right corner of the page.

(STEP 2) If you already have a Google account, simply log in, and you will be redirected to the reCAPTCHA dashboard.

(STEP 3) If you do not have a Google account, follow the registration steps; once completed, you will be redirected to the reCAPTCHA dashboard.

(STEP 4) On the dashboard page, you will see a form to register a new site. Fill in the following fields:

Label (Your site`s identifier)

Choose the type of reCAPTCHA (Select the reCAPTCHA model. We recommend reCAPTCHA v2 - Checkbox)

Domains (The domains and subdomains authorized to use this reCAPTCHA)

Accept the reCAPTCHA Terms of Service (Accept the reCAPTCHA system`s Terms of Service)

Send alerts to owners (Enable email notifications to owners regarding any issues with the Google reCAPTCHA).

(STEP 5) After filling in all the fields, click "Register."

The reCAPTCHA has now been successfully registered. You will see a page displaying the details needed to configure reCAPTCHA on your contact forms or within your site/system.

CONFIGURING RECAPTCHA ON YOUR SITE

Now, the technical setup for the reCAPTCHA system begins. Follow the steps below:

(STEP 1) Add the reCAPTCHA script to the page header (`<head>`) of the contact form. (STEP 2) Before closing your form, add the ReCaptcha div using the Site Key provided after registering with Google`s system.

You`re all set! The ReCaptcha validation system will now appear on your contact form.