User-Agent

Every HTTP request carries a software fingerprint. The User-Agent request header identifies the client application, version, and platform sending the request.

Usage

Clients include User-Agent in every request to identify the application, operating system, and rendering engine to the server. Servers use this information for content negotiation, analytics, and compatibility adjustments.

The value follows a structured format of product tokens. Each token consists of a product name and an optional version, followed by optional comments in parentheses. Multiple tokens appear space-separated.

User-Agent: <product>/<version> (<comment>) <product>/<version>

In practice, browser User-Agent strings have grown long and complex due to historical compatibility patterns. Most browsers include Mozilla/5.0 as the first token for legacy reasons, followed by platform details in a comment, then engine and browser tokens.

Servers serving different content based on User-Agent values implement a form of content negotiation. Search engine crawlers identify themselves through this header, allowing servers to apply crawler-specific logic. Bot detection systems analyze User-Agent patterns to distinguish automated traffic from human visitors. Many crawlers, among them Googlebot Smartphone, Bingbot, Amazonbot and the Meta and OpenAI crawlers, present a Chrome-like string, so the bot token inside the string identifies them, never the engine tokens around it.

The Sec-CH-UA family of headers provides a structured alternative to the User-Agent string. User-Agent Client Hints deliver the same information in parsed fields, with only low-entropy hints sent by default. The browser sends a minimal set of hints by default, and the server requests additional detail through the Accept-CH response header. This reduces the passive fingerprinting surface compared to a full User-Agent string.

Directives

product

A product identifier for the client software. By convention, the most significant product is listed first.

version

A version string associated with the preceding product token, separated by a forward slash.

comment

Additional details in parentheses, typically describing the operating system, device, or platform. Comments appear after a product/version pair.

Example

A desktop browser sends a User-Agent string containing the platform, rendering engine, and browser version. The Mozilla/5.0 prefix is a historical artifact present in all modern browsers.

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.0.0.0 Safari/537.36

A mobile browser includes the platform and a Mobile token in the comment section. Reduced Chrome on Android sends the literal values Android 10 and K for every device, whatever Android version or model the phone runs.

User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.0.0.0 Mobile Safari/537.36

Chrome's UA reduction freezes the minor, build, and patch components to 0.0.0. The major version increments with each release.

Search engine crawlers use distinctive User-Agent values for identification. The comment contains a URL pointing to documentation about the crawler. Google documents three Googlebot forms. The smartphone string drives mobile-first indexing and carries a full four-part Chrome version in place of W.X.Y.Z.

User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

The desktop string wraps the same Googlebot/2.1 token in a Chrome-like shell.

User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/W.X.Y.Z Safari/537.36

Google lists the short form as rare, yet verified Googlebot desktop traffic arrives with exactly this string, so rules matching Googlebot need to accept all three.

User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

Bingbot uses a Chromium-based UA string. Bing states the W.X.Y.Z version component follows the Microsoft Edge version its renderer runs. The token changes over time and lags well behind current Chrome releases, so rules matching an exact version misfire.

Desktop:

User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/W.X.Y.Z Safari/537.36

Mobile:

User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)

Command-line tools and HTTP libraries send shorter, simpler values.

User-Agent: curl/8.4.0

Custom API clients and bots include a descriptive product name, version, and contact URL:

User-Agent: MyBot/1.0 (+https://example.re/bot)

Privacy

The User-Agent string is a significant browser fingerprinting vector. The combination of browser, version, OS, and platform details creates a near-unique identifier that tracking scripts exploit without cookies or explicit consent.

Chrome's User-Agent reduction initiative freezes parts of the string and moves detailed information to Sec-CH-UA Client Hints, which require explicit server opt-in through Accept-CH. This shifts detailed client data from passive exposure to active negotiation.

Servers should not rely on User-Agent for security decisions such as authentication or access control. Clients control the value and spoof the string trivially.

Verifying crawler identity

Any client sets the User-Agent value freely, so a string naming Googlebot proves nothing on its own. Google and Bing both document two checks: a reverse DNS lookup on the requesting IP address, confirmed by a forward lookup mapping the hostname back to the same address, or a match of the address against their published crawler IP ranges. Either check settles the question. Google is also testing Web Bot Auth, in which agents sign their requests and announce the key through Signature-Agent, as a cryptographic addition to these checks for Google-Agent. Google-Agent acts on user requests from Google infrastructure, carries a Google-Agent token in User-Agent, and comes from the addresses in user-triggered-agents.json rather than the crawler ranges.

Request header order and TLS handshake details are secondary signals: a spoofed Googlebot string from a different HTTP stack sends a different header order and a different ClientHello, which is why CDN bot management weighs them. Reverse DNS, published IP lists and message signatures remain the checks that verify a crawler.

A block keyed only to the User-Agent string stops clients that identify themselves honestly, while scrapers send a browser string and pass.

Server-side rules keyed to the header reach real crawlers as readily as unwanted traffic. nginx map $http_user_agent blocks and Apache BrowserMatch rules apply before any verification step, so a rule aimed at scrapers removes Googlebot when the pattern is loose.

Crawlers and User-Agent

Verified crawler probe

Probe data from verified crawler traffic (November 2026 snapshot) shows which bots send User-Agent when requesting pages. Yes marks the header on at least nine of ten sampled requests from the bot, Sometimes marks a smaller share, and No marks absence.

Crawler Sends User-Agent
Amazonbot Yes
Applebot Yes
Baiduspider Yes
Bingbot Yes
ClaudeBot Yes
DuckDuckBot Yes
GPTBot Yes
Googlebot Yes
Googlebot (smartphone) Yes
Googlebot-Image Yes
Meta-ExternalAgent Yes
Meta-WebIndexer Yes
OAI-SearchBot Yes
PerplexityBot Yes
SeznamBot Yes
YandexBot Yes
YandexFavicons Yes

See also

Last updated: November 18, 2026