Web Bot Auth·续
`nonce`
The nonce parameter allows you to supply a nonce to prevent attackers from replaying past messages against a server.
While Cloudflare recommends including it, there is currently no nonce validation, nor does Cloudflare guard against replay attacks using a database of seen nonces.
Instead, Cloudflare recommends short expires as a protection against replay attacks. A minute is often sufficient.
Signature header
Construct a Signature header ↗︎ over your chosen components.
Signature-Agent header
Construct a Signature-Agent header ↗︎ that points to your key directory. Cloudflare implements the Signature-Agent format from draft-meunier-http-message-signatures-directory-03, where the header value is a structured string such as "https://signature-agent.test".
Cloudflare will fail to verify a message if:
- The message includes a
Signature-Agentheader that is not anhttps://. - The message includes a valid URI but does not enclose it in double quotes. This is due to Signature-Agent being a structured field.
- The message uses the dictionary form from later drafts, such as
sig2="https://signature-agent.test". - The message has a valid
Signature-Agentheader, but does not include it in the component list inSignature-Input.
4.4. Add the headers to your bot's requests
Attach these three headers to your bot's requests.
An example request may look like this:
Signature-Agent: "https://signature-agent.test"
Signature-Input: sig2=("@authority" "signature-agent")
;created=1735689600
;keyid="poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U"
;alg="ed25519"
;expires=1735693200
;nonce="e8N7S2MFd/qrd6T2R3tdfAuuANngKI7LFtKYI/vowzk4lAZYadIX6wW25MwG7DCT9RUKAJ0qVkU0mEeLElW1qg=="
;tag="web-bot-auth"
Signature: sig2=:jdq0SqOwHdyHr9+r5jw3iYZH6aNGKijYp/EstF4RQTQdi5N5YYKrD+mCT1HA1nZDsi6nJKuHxUi/5Syp3rLWBA==:
Note
You can test how Cloudflare interprets your signed requests against https://crawltest.com/cdn-cgi/web-bot-auth ↗︎. This endpoint returns an HTTP 401 if your message is formatted correctly but your key is unknown, an HTTP 200 if the key is known and your message is verified, and an HTTP 400 otherwise. You may also see an HTTP 401 if your key is known but the message failed to verify.
Transitive trust and the Forwarded header
An agent that reaches your site is often not operated by the company that built it. A platform can run automations on behalf of many different end users, so the operator and the end user are not the same party. Cloudflare refers to this chain — website owner → bot operator → end user — as transitive trust.
To carry an operator's identity through that chain, Cloudflare is experimenting with the Forwarded header defined in RFC 7239 ↗︎. This works like X-Forwarded-For does for IP addresses: a preference to allow an operator holds whether that operator reaches you directly or through intermediaries that Cloudflare trusts.
The operator is identified with the for parameter:
Forwarded: for="openai"
The header can also carry the content-use value that the operator commits to for the content it accesses:
Forwarded: for="openai";use="reference"
Note
Transitive trust and the Forwarded header are experimental and may change.
Limitations
Cloudflare's implementation of Web Bot Auth does not support every component and parameter defined in IETF RFC 9421. If you include any of the following in your request's Signature-Input header, verification will fail.
@query-params: Cloudflare recommends signing the whole query using the@querycomponent instead of signing an individual parameter.@status: This is not possible to include in the request path.
The following component parameters defined in IETF RFC 9421 are not supported, and Cloudflare will fail to verify a message if they are included:
sf(for HTTP header fields)bs(for HTTP header fields)key(for HTTP header fields)req(for HTTP header fields or derived components)name(for@query-paramsupport - this requires@query-paramsupport)
Troubleshooting
Failed message validation
If your message is failing validation, the cause(s) may include:
- Ensure you have a
Signature-Agentheader, and that its value is in double-quotes. - Ensure your
Signature-Agentheader uses a structured string, not a dictionary. - Ensure you include
signature-agentin the component list in yourSignature-Inputheader. - Ensure your
expirestimestamp is not too short, such that, by the time it arrives at Cloudflare servers, it has already expired. A minute is often sufficient. - Ensure you are not signing components containing non-ASCII values, or on the unsupported list.
Use HTTP message signatures / Web Bot Auth on a zone without Cloudflare's verification
If you wish to use HTTP Message Signatures (Web Bot Auth) for your own origin processing and do not want Cloudflare's verification to intervene or populate the cf.bot_management.verified_bot field, you can request that the Cloudflare verification feature be disabled for your zone.
To disable Web Bot Auth verification, contact Cloudflare Support.
Disabling this feature means that Cloudflare will not validate incoming signatures. Verified bots will then fall back to other methods (such as reverse DNS validation) to determine if traffic is legitimate.
Additional resources
You may wish to refer to the following resources.
- Cloudflare blog: Message Signatures are now part of our Verified Bots Program ↗︎.
- Cloudflare blog: Forget IPs: using cryptography to verify bot and agent traffic ↗︎.
- Cloudflare's
web-bot-authlibrary in Rust ↗︎. - Cloudflare's
web-bot-authnpm package in Typescript ↗︎.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/bots/reference/bot-verification/web-bot-auth/#page","headline":"Web Bot Auth","description":"Verify bot identity using cryptographic HTTP message signatures.","url":"https://developers.cloudflare.com/bots/reference/bot-verification/web-bot-auth/","inLanguage":"en","image":"https://developers.cloudflare.com/bots/reference/bot-verification/web-bot-auth/og.png?v=df63f6df1ad987bc","dateModified":"2026-10-08","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["Authentication"]}
description: Manage auto-updates for Bot Management machine learning models. title: Machine Learning models image: https://developers.cloudflare.com/bots/reference/machine-learning-models/og.png?v=2c5a51dacee49773
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/bots/llms.txt
Use this file to discover all available pages before exploring further.
Docs