If you are looking to make your Magento 2 store secure, you have to follow the best practices.
So, adding reCAPTCHA is one of them. reCAPTCHA is introduced by Google to reduce human efforts used to prevent spam. With this new reCAPTCHA, you just need to click away to show that you are a human, not any bot.
So, you can’t neglect Magento 2 Google Invisible reCAPTCHA, if you want a reliable and secure eCommerce store.
How to Add Google reCAPTCHA to protect your Magento 2 Site?
Here, we have listed five steps that will take you through the process of how you can add Magento 2 reCAPTCHA to your Magento website step by step.
Create a New Account at Google reCAPTCHA
Registering a Google reCAPTCHA account is quite a simple process. You need to sign in with your Gmail account. After that, go to Google’s reCAPTCHA sign up page. This is what you can start the reCAPTCHA process.
Fill up the registration form and choose the type of your Google reCAPTCHA
Now, first, fill out the label for the keys then choose the type of reCAPTCHA. You can check that three types of reCAPTHCHA are available in the registration process.
- reCAPTCHA V2: reCAPTCH V2 validates requests with a single button click. In this type, the user needs to tap the checkbox “I am not a robot” to be authenticated.
Invisible reCAPTCHA: Invisible reCAPTCHA validates requests in the background without any interaction with the user.
So, there is no need to click any authentication button or do any test. The captcha will automatically do that work for your customers.
After selecting your desired captcha type, here you need to enter your Magento domain and subdomain on which you are looking to add Magento 2 Google reCAPTCHA.
Now, click the checkbox to accept terms of services and then click on Register.
Get the key to created Google reCAPTCHA
After registering, you will be automatically redirected to the new page.
Here you need to check to “add reCAPTCHA to your site section” and you will get the captcha keys here itself.
In this step, you need to copy Site Key and Secret Key as that will help you in the next step.
-
It’s Time to Configure Google reCAPTCHA in Magento 2
Now, you need to go to the admin panel of your Magento store and follow the below steps:
- On the Admin sidebar, follow the path Stores > Settings > Configuration.
- Set Store View to Default Config in the upper-right corner.
- Expand Security and choose Google reCAPTCHA from the left panel.
-
Expand the General section and enter the following generated keys on the page:
- Google API website key
- Google API secret key
After that, copy and paste KEY in the configuration.
Expand the Backend and Front End Section and Set the Specific Options
If you want to change the setting then clear the Use system value checkbox.
- Enable is used to set Yes.
- The theme is used to choose Light or Dark.
- Size is used to choose Normal or Compact.
Expand the Frontend section and add Google reCAPTCHA to customer accounts:
Here also if you want to change the setting then clear the Use system value checkbox.
- Enable is for Set to Yes.
- reCAPTCHA type is to choose the type you want to be used in forms. You must have added the correct API keys for the type.
- reCAPTCHA v2 validates with the “I’m not a robot” checkbox.
- Invisible reCAPTCHA (recommended) validates in the background without requiring user interactions.
- The theme is used to choose Light or Dark.
- Size is used to choose Normal or Compact.
- Select where the CAPTCHA is used.
- By default, reCAPTCHA is enabled for these pages.
- Use in Login
- Use in Forgot password
- Use in Contact
- Use in Create user
- Use in PayPal PayflowPro payment form
As soon as you complete the above process, just you need to click on Save Config.
-
It’s done! Congratulations! You have successfully added a Google reCAPTCHA.
Now, to cross-check, just go to any page of your store and do the needful. We are showing a demo for the contact page and here is a result.
By checking the above output from the screenshot, we can say that Magento 2 reCAPTCHA is successfully configured.
For any reason, if you want to disabling Google reCAPTCHA use command:
php bin/magento msp:security:recaptcha:disable
Google reCAPTCHA Magento 2 extension by MageAnts secures your Magento stores from bots, spammers and any other malicious actors without annoying your store customers.
Because our team of professionals cares about maintaining a good reputation, customer privacy and security as they know these are key points for managing any website especially eCommerce websites.
Why you should choose MageAnts Magento 2 google recaptcha extension?
- We have included an option to choose light and dark reCAPTCHA theme
- Easy to enable reCAPTCHA on all webpages including contact us form, customer registration form, product review, newsletter subscription, forgot password, checkout registration, etc.
- Very easy to add to any forms on the front end
- Workable for frontend as well as backend
- Support both visible and invisible captcha
Hope it will be beneficial to you, if you need any help or need any customization, don’t hesitate to contact us.
Our professionals are here to help you happily.