-
是否应该使用 reCAPTCHA Enterprise?
-
reCAPTCHA Enterprise 每月免费提供多达 10,000 次评估 还提供了其他功能 <ph type="x-smartling-placeholder"></ph> 其他功能 (例如实时分析)可为大多数开发者提供最佳的着手点。 <ph type="x-smartling-placeholder"></ph> 点击此处开始使用。
-
我能否将 reCAPTCHA 与第三方解决方案搭配使用?
-
可以,您可以使用 reCAPTCHA(非企业版)和 reCAPTCHA 企业通常,第三方解决方案会要求您提供公钥 以及您的密钥或 API 密钥。请确保仅提供 密钥和 API 密钥提供给受信任的第三方。
-
如何从 v2 或 v3 迁移到 reCAPTCHA Enterprise?
-
迁移过程 只需 5-10 分钟即可完成,而且无需更改代码。
-
我应该使用 reCAPTCHA v2 还是 v3?
-
reCAPTCHA v3 适用于想要更多流量数据的网站所有者。 如需了解详情,请参阅 reCAPTCHA v3 开发者指南。
我们支持 v2 的安全性和易用性。
如需详细了解 reCAPTCHA v2 与 v3 的区别,请参阅版本比较。
- reCAPTCHA 会在执行时设置必要的 Cookie (_GRECAPTCHA),以便进行风险分析。 如果您不想使用可能已设置其他 Cookie 的 www.google.com 网域,则可以改用 www.recaptcha.net。
-
我使用 reCAPTCHA 时是否存在任何 QPS 或每日限制?
- 如果您希望每秒调用 1000 次以上或每月调用 100 万次以上,则必须使用 <ph type="x-smartling-placeholder"></ph> reCAPTCHA Enterprise 或填写 此表单,然后等待例外批准。 如果网站密钥超过 1000 QPS,则部分请求可能无法得到处理。 如果 v3 网站密钥超过其每月配额,site_verify 可能无法打开 方法是返回静态分数 0.9 和错误消息“Over free quota”(超过免费配额)。 。在以下情况下,系统不会向用户显示任何可见指示 v3 网站已超出配额。 如果 v2 网站密钥超过其每月配额,则采用以下方式或类似形式 消息,系统可能会在 reCAPTCHA widget 中向用户显示 “此网站正在超出 reCAPTCHA 配额。” 在配额实施之前,网站拥有者会收到三次电子邮件通知,一次 并留出至少 90 天的时间来迁移到 reCAPTCHA Enterprise。 如果每月调用次数超过 100 万次,则将网站密钥视为超出配额 用于任何网域。这包括此转化量是否分布在多个 密钥。
-
我想隐藏 reCAPTCHA 徽章。允许哪些行为?
-
只要能在用户体验流程中显示 reCAPTCHA 品牌信息,您就可以隐藏此徽章。请添加以下文字:
This site is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy">Privacy Policy</a> and <a href="https://policies.google.com/terms">Terms of Service</a> apply.
例如:
注意:如果您选择隐藏徽章,请使用
.grecaptcha-badge { visibility: hidden; }
-
我想使用 reCAPTCHA 运行自动化测试。该怎么做?
-
对于 reCAPTCHA v3,请单独创建一个用于测试环境的密钥。得分可能不准确,因为 reCAPTCHA v3 依赖于实际流量。
对于 reCAPTCHA v2,请使用以下测试密钥。系统将始终显示“无需人机识别系统”,且所有验证请求都会通过。
- 网站密钥:6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
- 密钥:6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
reCAPTCHA widget 将显示一条警告消息,以确保其未用于生产流量。
-
在调试网站时,如何避免单步进入 reCAPTCHA 代码?
-
为避免在调试您网站上的其他 JavaScript 时进入 reCAPTCHA 代码,请将 reCAPTCHA 脚本
/recaptcha__.+\.js$
添加到浏览器的忽略列表中。如需了解适用于 Chrome 的说明,请参阅忽略自定义的脚本列表。其他浏览器也提供类似的功能。 -
如何查看有关我的网站流量的更多信息?
-
reCAPTCHA 会在管理控制台中报告每日统计信息。
-
reCAPTCHA 可以在全球范围内使用吗?
-
是,请使用“www.recaptcha.net”“www.google.com”的情况下无法访问。
- 首先,将 <script src="https://www.google.com/recaptcha/api.js"></script>(<script src="https://www.recaptcha.net/recaptcha/api.js"></script>)
- 之后,将相同的操作应用到所有使用“www.google.com/recaptcha/”的地区。
-
我可以自定义 reCAPTCHA widget 或徽章吗?
-
可以。reCAPTCHA 提供两个主题(浅色和深色),如下所示。要选择主题 在 grecaptcha.render 中设置 data-theme 属性 参数。
浅色主题:
深色主题:
-
如何自定义 reCAPTCHA v3?
-
适用于隐形 reCAPTCHA 的 JavaScript API 也适用于 v3。只需使用 JavaScript API 通过 v3 网站密钥显式呈现 reCAPTCHA,即可获得一些选项(例如重新放置徽章或更改主题)。
使用此方法呈现 reCAPTCHA v3 时,请记得将
size
参数设置为'invisible'
,并在调用grecaptcha.execute
时使用grecaptcha.render
返回的客户端 ID,而不是网站密钥。 -
最近,我的 reCAPTCHA widget 开始显示“网站密钥无效”。发生了什么?
-
-
我遇到了未捕获的 SecurityError:已屏蔽源为“https://www.google.com”的帧访问来源为“<your domain>”的框架该怎么做?
-
如果在最终用户点击复选框后的某个时间以编程方式移除 reCAPTCHA 微件 HTML 元素,通常会发生这种情况。我们建议使用 grecaptcha.reset() JavaScript 函数来重置 reCAPTCHA 微件。
-
我在网站上使用了内容安全政策 (CSP)。如何配置它才能与 reCAPTCHA 搭配使用?
-
我们建议使用 CSP3 中载述的基于 Nonce 的方法。 请务必在 reCAPTCHA api.js 脚本标记中添加 Nonce,我们会处理其余工作。
注意:reCAPTCHA 也可在支持 'strict-dynamic' 的浏览器上使用它。
或者,请将以下值添加到配置参数中:
- script-src https://www.google.com/recaptcha/、https://www.gstatic.com/recaptcha/
- frame-src https://www.google.com/recaptcha/、https://recaptcha.google.com/recaptcha/
-
我收到错误消息“本地主机不在支持的网域列表中”。该怎么做?
-
localhost 网域默认不受支持。如果您想继续为他们提供支持 可以将其添加到支持网站密钥的网域列表中。前往 reCAPTCHA Enterprise 控制台 或提供给 reCAPTCHA 控制台(视情况而定) 更新您的受支持网域列表。我们建议在开发和 在生产环境中使用,并且仅允许在开发网站密钥上使用 localhost。
-
仅在 iOS 10 上,当用户完成挑战时页面会滚动到底部?
-
这是 Apple 方面一个聚焦的错误,我们已向他们报告。此问题只会影响使用 iOS 10 的用户,并且只会影响某些网站上的用户。如果您受到影响,则临时解决方法是将 reCAPTCHA 微件在页面中的位置上移或下移,或者使用 reCAPTCHA v3。
-
我的计算机或网络可能正在发送自动查询?
-
如果您是从 reCAPTCHA 微件转到此页面,则会看到一条消息:“很抱歉,您的计算机或网络可能正在发送自动查询。为了保护我们的用户,我们目前无法处理您的请求。”
好的用户可能会发生这种情况,原因如下:
- 你所在的共享网络可能被滥用了
- 您的互联网服务提供商最近可能为您分配了一个可疑的 IP 地址
- 您尝试访问的网站当前可能遭受了严重攻击
要排查此类问题,请查看“异常流量”帮助页面或稍后再试。
-
哪些操作名称有效?
-
操作只能包含字母数字字符、斜杠和下划线。 操作不得特定于用户。
常见问题解答
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003ereCAPTCHA Enterprise offers a free tier with 10,000 assessments per month and advanced features like real-time analytics.\u003c/p\u003e\n"],["\u003cp\u003eYou can migrate to reCAPTCHA Enterprise from v2 or v3 in 5-10 minutes without code changes.\u003c/p\u003e\n"],["\u003cp\u003ereCAPTCHA v3 provides website traffic insights while v2 focuses on security and usability.\u003c/p\u003e\n"],["\u003cp\u003ereCAPTCHA sets a necessary cookie but you can use www.recaptcha.net instead of www.google.com to avoid other potential Google cookies.\u003c/p\u003e\n"],["\u003cp\u003eTo hide the reCAPTCHA badge, ensure the reCAPTCHA branding is visible in the user flow with the provided text snippet.\u003c/p\u003e\n"]]],["reCAPTCHA offers Enterprise and non-Enterprise versions, with the former providing 10,000 free assessments monthly and features like real-time analytics. Migration to Enterprise is quick and doesn't require code changes. reCAPTCHA v3 provides more traffic data than v2. Both versions are compatible with third-party solutions, using public and secret/API keys. reCAPTCHA sets a necessary cookie, but an alternative domain is available. There are rate and volume limits; exceeding them may cause errors. You can hide the badge with specific text included, set testing keys, and use multiple ways to customize its behaviour.\n"],null,["# Frequently Asked Questions\n\n### Should I use reCAPTCHA Enterprise?\n\n\n:\n reCAPTCHA Enterprise offers up to 10,000 assessments per month at no cost\n and also provides additional features.\n [Other features](https://cloud.google.com/recaptcha-enterprise/docs/compare-versions)\n such as real time analytics provide the best place to start for most developers.\n [Get started here.](https://www.google.com/recaptcha/admin/enterprise)\n\n\n### Can I use reCAPTCHA with third party solutions?\n\n\n:\n Yes, you can use both reCAPTCHA (non-Enterprise version) and reCAPTCHA\n Enterprise. Typically the third party solution asks for your public key\n and either your secret key or your API key. Make sure to only provide your\n secret key and API key to trusted third parties.\n\n\n### How to migrate to reCAPTCHA Enterprise from v2 or v3?\n\n\n:\n The [migration process](http://cloud.google.com/recaptcha-enterprise/docs/migrate-recaptcha)\n takes 5-10 minutes to complete and requires no code changes.\n\n\n### Should I use reCAPTCHA v2 or v3?\n\n\n:\n reCAPTCHA v3 is for site owners who want more data about their traffic.\n For more information, see the [reCAPTCHA v3 developer guide](/recaptcha/docs/v3).\n\n We support security and usability for v2.\n\n\n For more information about reCAPTCHA v2 and v3 differences, see [versions comparison](/recaptcha/docs/versions).\n\n\n### Does reCAPTCHA use cookies?\n\n\n:\n reCAPTCHA sets a necessary cookie (_GRECAPTCHA) when executed for the purpose of providing its risk analysis.\n If you prefer to not use the www.google.com domain which may have other cookies set, you can use www.recaptcha.net instead.\n\n\n### Are there any QPS or daily limits on my use of reCAPTCHA?\n\n\n:\n If you wish to make more than 1000 calls per second or 1000000 calls per month, you must use\n [reCAPTCHA Enterprise](https://cloud.google.com/recaptcha-enterprise) or fill out\n [this form](https://forms.gle/caCX5Sgkz2N1maGa9) and wait for an exception approval.\n If a site key exceeds 1000 QPS, then some requests may not be processed.\n If a v3 site key exceeds its monthly quota, then site_verify may fail open\n by returning a static score 0.9 and an error message \\`\"Over free quota.\"\\`\n for the remainder of the month. There are no user-visible indications when\n v3 sites are over quota.\n If a v2 site key exceeds its monthly quota, then the following or a similar\n message may be displayed to users in the reCAPTCHA widget for the remainder\n of the month: \\`This site is exceeding reCAPTCHA quota.\\`\n Before quota is enforced, site owners will be notified by email three times\n and given at least 90 days to migrate to reCAPTCHA Enterprise.\n Site keys are considered over quota if more than 1000000 calls per month are\n used for any domain. This includes if this volume is spread across multiple\n keys on the same domain.\n\n\n### I'd like to hide the reCAPTCHA badge. What is allowed?\n\n\n: You are allowed to hide the badge as long as you include the reCAPTCHA branding visibly in the user flow. Please include the following text:\n\n ```html\n This site is protected by reCAPTCHA and the Google\n \u003ca href=\"https://policies.google.com/privacy\"\u003ePrivacy Policy\u003c/a\u003e and\n \u003ca href=\"https://policies.google.com/terms\"\u003eTerms of Service\u003c/a\u003e apply.\n ```\n\n For example:\n\n **Note:** if you choose to hide the badge, please use \n\n ```css\n .grecaptcha-badge { visibility: hidden; }\n ```\n\n \u003cbr /\u003e\n\n\n### I'd like to run automated tests with reCAPTCHA. What should I do?\n\n\n: For reCAPTCHA v3, create a separate key for testing environments. Scores may not be accurate as reCAPTCHA v3 relies on seeing real traffic.\n\n For reCAPTCHA v2, use the following test keys. You will always get No CAPTCHA and all verification requests will pass.\n\n - Site key: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI\n - Secret key: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe\n\n The reCAPTCHA widget will show a warning message to ensure it's not used for production traffic.\n\n\n### How can I avoid stepping into reCAPTCHA code when debugging my site?\n\n\n: To avoid stepping into the reCAPTCHA code while debugging other JavaScript on your site, add the reCAPTCHA script `/recaptcha__.+\\.js$` to your browser's ignore list. For instructions for Chrome, refer to [Ignore a custom list of scripts](https://developer.chrome.com/docs/devtools/settings/ignore-list). Similar features are available in other browsers.\n\n\n### How can I see more about my website's traffic?\n\n\n: reCAPTCHA reports daily stats in the [admin console](https://www.google.com/recaptcha/admin).\n\n\n### Can I use reCAPTCHA globally?\n\n\n: Yes, please use \"www.recaptcha.net\" in your code in circumstances when \"www.google.com\" is not accessible.\n\n - First, replace \\\u003cscript src=\"https://**www.google.com** /recaptcha/api.js\"\\\u003e\\\u003c/script\\\u003e with \\\u003cscript src=\"https://**www.recaptcha.net**/recaptcha/api.js\"\\\u003e\\\u003c/script\\\u003e\n - After that, apply the same to everywhere else that uses \"www.google.com/recaptcha/\" on your site.\n\n\n### Can I customize the reCAPTCHA widget or badge?\n\n\n: Yes. reCAPTCHA offers two themes, light and dark, as shown below. To choose a theme, simply\n set the data-theme attribute in the [grecaptcha.render\n parameter](/recaptcha/docs/display#render_param).\n\n Light theme:\n\n Dark theme:\n\n\n### How can I customize reCAPTCHA v3?\n\n\n: The [JavaScript API](/recaptcha/docs/invisible#js_api) available for Invisible reCAPTCHA also works for v3. Simply use the JavaScript API to explicitly render reCAPTCHA with a v3 site key to access options such as repositioning the badge or changing the theme.\n\n When rendering reCAPTCHA v3 with this method, remember to set the `size` parameter to `'invisible'` and use the client ID returned by `grecaptcha.render` when calling `grecaptcha.execute` instead of the site key.\n\n\n### Recently my reCAPTCHA widget started displaying \"Invalid site key\". What's happening?\n\n\n:\n\n If you are seeing this error, your reCAPTCHA site key is no longer valid. To activate, please\n [register a new key](https://www.google.com/recaptcha/admin) and follow the [instructions](/recaptcha/intro) on that page.\n\n\n### I'm getting an uncaught SecurityError: blocked a frame with origin \"https://www.google.com\" from accessing a frame with origin \"\\<your domain\\>\". What should I do?\n\n\n: This typically occurs if the reCAPTCHA widget HTML element is programmatically removed sometime after the end user clicks on the checkbox. We recommend using the [grecaptcha.reset()](/recaptcha/docs/display#js_api) javascript function to reset the reCAPTCHA widget.\n\n\n### I'm using Content-Security-Policy (CSP) on my website. How can I configure it to work with reCAPTCHA?\n\n\n: We recommend using the nonce-based approach documented with [CSP3](https://w3c.github.io/webappsec-csp/#framework-directive-source-list).\n Make sure to include your nonce in the reCAPTCHA [api.js](/recaptcha/docs/display#auto_render) script tag, and we'll handle the rest.\n\n Note: reCAPTCHA also works with ['strict-dynamic'](https://w3c.github.io/webappsec-csp/#strict-dynamic-usage) on browsers that support it.\n\n Alternatively, please add the following values to the directives:\n\n - **script-src** https://www.google.com/recaptcha/, https://www.gstatic.com/recaptcha/\n - **frame-src** https://www.google.com/recaptcha/, https://recaptcha.google.com/recaptcha/\n\n\n### I'm getting an error \"Localhost is not in the list of supported domains\". What should I do?\n\n\n: localhost domains are not supported by default. If you wish to continue supporting them for\n development you can add them to the list of supported domains for your site key. Go to the\n [reCAPTCHA Enterprise console](https://console.cloud.google.com/security/recaptcha)\n or to the [reCAPTCHA console](https://www.google.com/recaptcha/admin), as appropriate,\n to update your list of supported domains. We advise to use separate keys for development and\n production, and to only allow localhost on your development site key.\n\n\n### Only on iOS 10, the page scrolls to the bottom when the user completes the challenge?\n\n\n: This is a focusing bug on Apple's side that we've reported to them. It affects users only on iOS 10 and only on some sites. If you are affected, a workaround is to move the reCAPTCHA widget higher or lower on the page, or use [reCAPTCHA v3](/recaptcha/docs/v3).\n\n\n### My computer or network may be sending automated queries?\n\n\n: If you were directed to this page from the reCAPTCHA widget, you would have seen a message that said \"We're sorry, but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.\"\n\n This can unfortunately happen to good users for a few reasons:\n\n - You may be on a shared network that is being used abusively\n - Your internet service provider may have recently assigned you a suspicious IP address\n - The site you are trying to access may be currently under heavy attack\n\n To troubleshoot these issues, please look at the [unusual traffic help page](https://support.google.com/websearch/answer/86640), or try again later.\n\n\n### What action names are valid?\n\n\n: Actions might contain only alphanumeric characters, slashes, and underscores.\n Actions must not be user-specific."]]