Skip to content

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.

  • 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.

  1. Sign in to your Google account.

  2. Go to the Google reCAPTCHA site.

  3. Click Get Started.

  4. 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).
  5. Click Submit.

  6. Google will generate your Site Key and Secret Key.

  • 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.