How To Add Google reCAPTCHA To Your Magento Site

How To Add Google reCAPTCHA To Your Magento Site?

Google reCAPTCHA is a free service from Google that helps protect your sites from spam and abuse. With this implementation, you will be able to reduce potential user errors when entering a CAPTCHA code and encourage cart conversion. In today’s blog, we will get to know the term “Google reCAPTCHA” and the way to add Google reCAPTCHA to your Magento site.

What is Google reCAPTCHA?

Google reCAPTCHA is a CAPTCHA (Completely Automated Public Turning test to tell Computers and Humans Apart) system, which allows web hosts to distinguish between human and automated access to websites.

By using an advanced risk analysis engine and adaptive challenges, Google reCAPTCHA prevents malicious software from engaging in abusive activities on your website. As a result, legitimate users will be able to log in, make purchases, view pages, or create accounts while fake users will be blocked.

Magento uses Google reCAPTCHA for both storefront and admin, which supports 3 methods of reCAPTCHA: reCAPTCHA v2 (“I’m not a robot”), reCAPTCHA v2 invisible and reCAPTCHA v3 invisible.

reCAPTCHA v2 invisible
Source: Magento

How to add Google reCAPTCHA to your Magento site?

Set up Google reCAPTCHA to get key

  1. Go to the Google reCAPTCHA create page (if the language is not English, you can open this link with an incognito browser)
  1. Fill in the information
  • reCAPTCHA type: Magento 2 uses 3 types of reCAPTCHA, so you need to set up 3 times to get 3 different keys: reCAPTCHA v3, reCAPTCHA v2 “I’m not a robot”, reCAPTCHA v2 invisible reCAPTCHA badge. We will create reCAPTCHA “I’m not a robot” first, so click on the “I’m not a robot” Checkbox.
  • Accept the reCAPTCHA Terms of Service
reCAPTCHA v3 invisible
Source: Magento
  1. Click on Submit
Google reCAPTCHA Keys
Source: Magento
  1. Copy the key and paste it on Magento configure

Set up reCAPTCHA Configuration of the admin page

  1. On the Admin Navigation bar, go to Store > Configuration > Security > Google reCAPTCHA Admin Panel
  1. Expand reCAPTCHA v2 (“I am not a robot”)
reCAPTCHA v2 (“I am not a robot”)
Source: Magento
  1. Paste site key and secret key setup in Google reCAPTCHA page to Google API Website Key & Google API Secret Key
  1. Scroll down to the Admin Panel tab
MUST READ:   Benefits of POS system for brick-and-mortar stores

This will configure which type of reCAPTCHA appears and when it will be applied, log in to the admin page or forgot the password

  1. Save Config and Flush cache

Configure Google reCAPTCHA Storefront

  1. In the left panel under Security, choose Google reCAPTCHA Storefront
  1. Complete the section for each reCAPTCHA type that you want to use in the storefront
  1. Expand the Storefront section
  1. Clear the Use system value checkbox for each storefront location
  1. Set each storefront location field to the type of reCAPTCHA that you have configured to use
  • Enable for Customer Login
  • Enable for Forgot Password
  • Enable for Create New Customer Account
  • Enable for Contact Us
  • Enable for Newsletter Subscription
  • Enable for Product Review
  • Enable for PayPal PayflowPro payment form
  • Enable for Send To Friend
  1. Click Save Config
  1. In the message at the top of the workspace, click Cache Management and refresh each invalid cache
Admin Panel
Source: Magento

To conclude

In this blog, we have shown you how to add Google reCAPTCHA to your Magento site. Hopefully, this blog has helped you to better manage your store in every operation. Visit our blog now for more tips on optimizing your Magento store!

Leave a Comment

Your email address will not be published. Required fields are marked *