Generating Google reCAPTCHA keys for site security
Google reCAPTCHA helps protect your website from spam and abuse by requiring users to complete a challenge or by scoring requests to detect bots. To integrate reCAPTCHA, you must generate Site Key and Secret Key values from Google.
About Google reCAPTCHA
Section titled “About Google reCAPTCHA”-
Provides anti‑abuse security for websites and applications.
-
Requires registering your domain with Google’s reCAPTCHA service.
-
Two keys are issued:
- Site Key (public key) → Used to render the reCAPTCHA widget on your site.
- Secret Key (private key) → Used for server‑side validation of user responses.
-
Keys are unique to each registered domain.
Steps to Generate reCAPTCHA Keys
Section titled “Steps to Generate reCAPTCHA Keys”-
Sign in to your Google account.
-
Go to the Google reCAPTCHA site.
-
Click Get Started.
-
On the Register a new site page, provide:
- Label → A name to identify the keys.
- reCAPTCHA type → Choose between challenge (checkbox/image test) or score (v3 invisible).
- Domains → Enter the domain(s) where the keys will be used (e.g.,
example.com).
-
Click Submit.
-
Google will generate your Site Key and Secret Key.
Using the Keys
Section titled “Using the Keys”- Site Key → Add to your HTML page where you want the reCAPTCHA widget to appear.
- Secret Key → Store securely on your server; use it to validate user responses via Google’s API.