Today, in this blog, we are going to cover how you can enable the Magento 2 default reCaptcha.
Google reCaptcha ensures that no robots or any other entity except for humans are interacting with the computer. It is significantly advanced then Magento Captcha. It has been designed to perform checks without any potential user error while entering numbers and letters. It works very smartly and smoothly to encourage visitors to complete the purchase.
Google reCaptcha can automatically verify the users with its increased security and fewer clicks. There are many ways you can implement the Google reCaptcha.
For Google reCaptcha v2 visitors and customers can be verified based on the on-click feature. It has two following methods to verify the users,
Method-1: All the users and customers will be asked to click on the “I am not a robot” checkbox. Some may need to select some images to get verified.
Method-2: In this method, reCaptcha stays invisible and performs checks in the background without any user interaction. It is recommended to have this method enabled for verification. All the users and customers will be verified automatically, and in some cases, users may need to select some pictures.
For reCaptcha v3 users and customers are verified by the Google algorithm score.
The Google reCaptcha can be enabled on the Magento 2 Admin login page and various customer login pages. Google reCaptcha also works with Magento Captcha. It does not override Captcha, and both can be enabled, for instance, without any problem.
Now Let’s look at how to generate and configure Google reCaptcha?
So, the first thing you need to do is to generate the Google reCaptcha keys from the reCaptcha site for free of cost. If you are new, then you may need to consider which type of Captcha you want to choose.
Let’s look at how to generate Google reCaptcha Key?
You will be asked to enter the Label for generating the keys. One key is enough for setting up the reCaptcha on your whole Magento site.
Now you have a choice to select the appropriate version for your Google reCaptcha.
reCaptcha v3 – It can verify users on the basis of a score.
reCaptcha v2 – It can verify the users with a click on the checkbox or with a challenge as mentioned above in method -1.
Next, you will be asked to enter all the domains without any prefix. E.g. example.com
Read and tick the checkbox to Accept the reCaptcha Terms of Service.
Select the checkbox of Send Alerts to owners to get notified of any suspicious traffic or issues identified by Google.
Now click on the submit button to generate the key for Google reCaptcha.
Now let’s look at how to configure Google reCaptcha In your Magento 2 store?
Configuration for reCaptcha v2:
Login to your admin backend.
From the sidebar, go to Store>Settings>configuration
Set the store view as default from the top right corner.
Expand the security from the left panel and select Google reCaptcha.
In the general section of the page, enter both the keys to enable the specific reCaptcha type.
Google API website key
Google API secret Key
Select the reCaptcha type of v2.
7. In the Backend section, configure the option as below
Enable: Set this to YES
Theme: You can choose either light or dark theme to be applicable only for reCaptcha v2 “I am not a robot” type.
Size: You can choose either normal or compact size to be applicable only for reCaptcha v2 “I am not a robot” type.
In the Frontend section, configure the Google reCaptcha for a customer account. To change any of the settings, you can select the use system value checkbox.
Enable: Set this as YES.
Invisible Badge Position: Select any of the options out of Inline, Bottom Right, or Bottom Left.
Theme: You can select Light or Dark theme to be applicable only for reCaptcha v2 “I am not a robot” type.
Size: You can choose either normal or compact size to be applicable only for reCaptcha v2 “I am not a robot” type.
Select where you want to use Captcha:
Use in a Login page
Use in Contact Us page
Use in Forgot password Page
Use in Create user page
Use in payments form like Paypal, Payflow pro
Use in Newsletter
Use on Review
Use in Send to Friend
Click on the Save Config button to save the changes.
Configuration for reCaptcha v3:
Login to your admin backend.
From the sidebar, go to Store>Settings>configuration
Set the store view as default from the top right corner.
Expand the security from the left panel and select Google reCaptcha.
In the general section of the page, enter both the keys to enable the specific reCaptcha type.
Google API website key
Google API secret Key
Select the reCaptcha type of v2.
7. In the Backend section, configure the option as below
Enable: Set this to YES.
Minimum score: Enter the values from 0.0 to 1.0. 1.0 Means that the interaction is good and 0.0 means that interaction is from a bot. For more details, see the official documentation.
In the Frontend section, configure the Google reCaptcha for a customer account. To change any of the settings, you can select the use system value checkbox.
Enable: Set this as YES.
Invisible Badge Position: Select any of the options out of Inline, Bottom Right, or Bottom Left.
Minimum score: Enter the values from 0.0 to 1.0. 1.0 Means that the interaction is good and 0.0 means that interaction is from a bot. For more details, see the official documentation.
Select where you want to use Captcha:
Use in the Login page
Use in Contact Us page
Use in Forgot password Page
Use in Create user page
Use in payments form like Paypal, Payflow pro
Use in Newsletter
Use on Review
Use in Send to Friend
Click on the Save Config button to save the changes.
So, this was it for the day. Now you can enable the google reCaptcha v2 or v3 on your Magento website for free, no need to purchase an extension for this now. If you found this article helpful, then let us know in the comments below. It will encourage us to write more and more useful articles.
Lastly, don’t forget to share this with your Magento partners and colleagues as well to let them know.
Also, Check out Magento 2 Google ReCAPTCHA by MageComp ?
Click to rate this post!
[Total: 2 Average: 5]
Gaurav Jain
Gaurav Jain is Co-Founder and Adobe Certified Expert-Magento Commerce Business Practitioner. Being Computer Engineer?? and possessing Extensive Marketing skills he handles all kinds of customer Queries and his Happy? & Helping? Nature makes customer's day Delightful. When he isn’t working, you’ll find Gaurav Reading on Books? or Traveling?. Also, he is Speaker at Magento Meetups.