How to Register reCAPTCHA v2 [2026 Edition]: Getting Your Site Key and Secret Key
- Web制作
- reCAPTCHA
Google’s reCAPTCHA is one of the most common ways to add spam and bot protection to contact forms and sign-up forms. This guide walks through registering reCAPTCHA v2 (the checkbox type) in Google’s admin console and getting the “Site Key” and “Secret Key” you need to add it to your site — illustrated with real screenshots.
Note on screenshots: The screenshots in this guide are taken from the Japanese-language version of Google’s reCAPTCHA admin console. You can usually switch Google’s interface to English from your Google Account’s language settings, but the labels here are shown in English with the original Japanese text in quotes (e.g. “Submit” 「送信」) so you can follow along either way.
About this article: This is not official Google documentation — it’s a walkthrough based on the author’s own notes and screenshots from actually registering a site. The admin console’s specifications and screens may change, so please also check the official Google reCAPTCHA documentation for the latest details.
What is reCAPTCHA v2?
reCAPTCHA is an authentication service from Google that helps prevent automated form submissions, spam, and malicious bot traffic. v2 is the most familiar type — it asks the user to click an “I’m not a robot” checkbox to verify they’re human. (Google also offers v3, which scores users without any interaction, and an invisible variant that doesn’t show a checkbox at all.)
To use it, you register your site through Google’s admin console with a Google account, then add the two keys it issues to your site:
- Site Key: added to the page (HTML) that displays the form
- Secret Key: used on the server side to verify whether the user’s response is valid
What you’ll need
- A Google account
- The domain of the site where you’ll add reCAPTCHA (e.g.,
example.com)
STEP 1: Open the reCAPTCHA admin console
Go to the reCAPTCHA admin console and log in with your Google account. You’ll see the “Register a new site” screen.
STEP 2: Enter the required details and register your site
On the registration screen, fill in and select the following:
- Label: An internal name to help you identify this site later — your site name works well.
- reCAPTCHA type: Choose “Challenge (v2),” then select the “‘I’m not a robot’ Checkbox” option underneath it.
- Domain: Enter the domain of the site where you’ll use reCAPTCHA.
- Review the details and check the box to accept the terms of service.

Once everything’s filled in, click “Submit” (「送信」).
STEP 3: Save the site key and secret key you’re given
After submitting, you’ll see a “Site Key” and “Secret Key” for that site. Make sure to save both.

- Site Key: used in the HTML code of the page shown to users
- Secret Key: used to authenticate communication between your site and reCAPTCHA
Where the site key and secret key are used
The two keys you issued are used in different places:
- Site Key: embedded in the HTML/JavaScript of the page that displays the form, to render the reCAPTCHA checkbox widget
- Secret Key: used server-side to check with Google whether the user’s checkbox response was valid
Exactly where you configure these depends on whether you’re wiring up your own form or using a WordPress plugin (like a contact form plugin). Most plugins have a settings screen — often called something like “reCAPTCHA Settings” — where you enter the site key and secret key. Check your form/plugin’s settings screen or documentation for specifics.
Common errors and how to fix them (troubleshooting)
Here’s a summary of common symptoms you might see while registering or setting this up, along with likely causes.
| Symptom | Likely cause | Fix |
|---|---|---|
| The reCAPTCHA checkbox doesn’t appear | The site key was entered incorrectly, or the page that loads it is misconfigured | Double-check that the site key matches what’s shown in the admin console |
| An error like “Invalid domain for site key” appears | The domain you’re actually using doesn’t match the domain registered in the admin console | Add or correct the domain in the admin console’s settings |
| Checking the box always results in a verification error | The site key and secret key have been swapped, or the secret key was entered incorrectly | Review the secret key configured on your server |
If none of these fix it, check Google’s reCAPTCHA help as well.
Handling the information you’ve issued
The secret key determines the outcome of reCAPTCHA’s verification, so it’s sensitive information. Keep the following in mind:
- Use the secret key only on the server side — never put it anywhere visible from the browser, like HTML or JavaScript
- Don’t hard-code it into your source or repository — load it from an environment variable instead
- When sharing it with a third party, such as an agency, avoid plain-text channels like chat or email, and use a secure method instead
Summary
Registering reCAPTCHA v2 is as simple as entering a label, reCAPTCHA type (the Challenge v2 checkbox), and domain in the admin console and submitting — your site key and secret key are issued immediately. From there, just add the two keys to your site or plugin’s settings, and reCAPTCHA’s spam protection is live.
If something isn’t working, check “Common errors and how to fix them” above and review your domain registration or where you entered the keys.