Back to Top

How to setup Google reCAPTCHA in Magento 2

Updated 22 April 2024

In this blog, We will discuss Google CAPTCHA, What is it? and how can we use it?

What is Google reCAPTCHA & Benefits

reCAPTCHA, a service provided by Google to safeguard your websites from spam and bots.

  • reCaptcha prevents spam and bot attacks to reduce suspicious access and fraud potential risk
  • reCAPTCHA protects user login, registration, and checkout processes and makes sure no robots are harming our site, making sure surfing our site are real humans.

To use CAPTCHA a valid Google API Website Key and Google API Secret Key are required

Adobe Commerce EU Captcha extension enhances the security of your store – Magento 2 EU Captcha Extension

Google reCAPTCHA in MAGENTO 2

CAPTCHA, short for Completely Automated Public Turing Test to Tell Computers and Humans Apart, reCAPTCHA is a tool that can differentiate between automated bots and humans.

Searching for an experienced
Magento Company ?
Find out More

In Adobe Commerce, CAPTCHA can be used in both Admin and Frontend areas. Adobe Commerce supports both standard CAPTCHA and Google CAPTCHA.

Enable Google CAPTCHA for Magento frontend

In the admin section go to

Store > Configuration > Security > Google CAPTCHA Storefront

for frontend Google reCaptcha configuration:

recaptcha config

In Magento three types of Google captcha


  • reCaptcha v2 (“I am not a robot”)
  • reCaptcha v2 Invisible
  • reCaptcha v3 Invisible

Here we can configure all three types of reCAPTCHA

1. reCAPTCHA v2 (“I am not a robot”)

  • Google API Website Key: Enter Google captcha account website key
  • Google API Secret Key: Enter Google captcha account API key
  • Size: Select size from Normal or Compact
  • Theme: Can change the theme to Light or Dark
  • Language Code: can set language code (two character code)

2. reCAPTCHA v2 Invisible

  • Google API Website Key: Enter Google captcha account website key
  • Google API Secret Key: Enter Google captcha account API key
  • Invisible Badge Position: choose the badge position on each page. positions- Inline / Bottom Right / Bottom Left
  • Theme: Can change the theme to Light or Dark
  • Language Code: can set language code (two character code)

3. reCAPTCHA v3 Invisible

  • Google API Website Key: Enter Google captcha account website key
  • Google API Secret Key: Enter Google captcha account API key
  • Minimum Score Threshold: Score between (1.0 to 0, where 1.0 is a typical user interaction, and 0.0 is likely a bot)
  • Invisible Badge Position: choose the badge position on each page. positions- Inline / Bottom Right / Bottom Left
  • Theme: Can change the theme to Light or Dark
  • Language Code: can set language code (two character code)

Basically, the main common configuration for all three types of reCAPTCHA is –

  1. Google API Website Key
  2. Google API Secret Key
recaptcha config

We can also configure reCAPTCHA validation and technical failure messages –

Store > Configuration > Security > Google CAPTCHA Storefront > reCAPTCHA Failure Messages

recaptcha error message

Finally, we can enable reCAPTCHA any one of three for frontend forms. some options are below

  • Use in Login
  • Use in Forgot password
  • Use in Contact
  • Use in Create user
  • Use in Review

Store > Configuration > Security > Google CAPTCHA Storefront > Storefront

Some Form view with Google reCAPTCHA

Enable Google CAPTCHA for Magento admin

In admin reCAPTCHA configuration also same as front end

For Admin you can enable reCAPTCHA for login and forgot password

recaptcha admin

If you have any questions please comment below, and we will try to respond to you.

Thanks! ­čÖé

login-recaptcha

Hire Magento 2 developers

. . .

Leave a Comment

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


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home