---
title: "What is a user agent?"
url: https://proxy.wiki/glossary/user-agent/
type: Glossary Term
author: "proxy.wiki editorial"
published: 2026-08-19
updated: 2026-10-21
site: proxy.wiki
topics: ["Web scraping"]
license: CC BY 4.0; quote freely with attribution to https://proxy.wiki/
---

# What is a user agent?

> The User-Agent request header, in which a client names its software and version. The client sets it, so servers treat it as a claim.

Every HTTP client sends one unless told not to, and the default names the library. RFC 9110 defines the field as a list of product names with optional versions and comments, most significant first, and asks senders not to include needlessly fine-grained detail, because long strings help identify users. Nothing stops a client writing anything it likes there, so on its own the header proves nothing.

The default headers of nine HTTP clients, captured at the byte level and compared with a browser, are the subject of the proxy.wiki study [What HTTP clients send before you configure anything](/research/default-request-headers/). This entry covers the one header and what to do with it.

## What your client sends

Point the client at a listener that prints the request, and read the header off the wire:

```
# terminal 1, Python 3.9 or later
python3 -c "import socket;s=socket.create_server(('127.0.0.1',47080));c,_=s.accept();print(c.recv(65536).decode())"

# terminal 2
curl -s http://127.0.0.1:47080/

# terminal 1 prints
GET / HTTP/1.1
Host: 127.0.0.1:47080
User-Agent: curl/8.7.1
Accept: */*
```

curl itself prints nothing and exits with code 52, empty reply from server, because the listener closes without answering. Running the same listener against other clients on the same machine gave these defaults:

| Client | User-Agent sent by default |
| --- | --- |
| curl 8.7.1 | curl/8.7.1 |
| python-requests 2.32.3 | python-requests/2.32.3 |
| Python 3.9 urllib | Python-urllib/3.9 |
| Node 24.2.0 global fetch | node |
| GNU Wget 1.25.0 | Wget/1.25.0 |
| Google Chrome 155, headless mode | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/155.0.0.0 Safari/537.36 |
| Chrome for Testing 148, headless shell | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/148.0.7778.96 Safari/537.36 |

Three details in that list are worth knowing. Node’s fetch sends the single word `node`, with no version. Both headless Chrome builds keep the word `HeadlessChrome`, so a server learns the browser is automated from one header, with no fingerprinting at all. And Chrome 155 reports its version as `155.0.0.0`: Chromium’s user-agent reduction replaces the minor, build and patch numbers with zeros and freezes the macOS platform at `Intel Mac OS X 10_15_7`, which is why a Mac on Apple silicon still claims to be Intel. The headless shell sends its full four-part version instead.

## Why the string convinces nobody by itself

A server compares it with evidence the header cannot control: the [TLS handshake](/glossary/tls-fingerprinting/), the rest of the header set and its order, and, inside a page, the client hints and the [browser fingerprint](/glossary/browser-fingerprinting/). A Chrome string sent by python-requests arrives with requests’ handshake and requests’ four other default headers. That is a louder automation signal than the honest default, because it is a contradiction rather than a plain answer. The handshake side is measured in the [TLS ClientHello fingerprint study](/research/tls-clienthello-fingerprints/).

## Choosing what to send

There are two coherent choices. One is an honest string that names your tool and gives a contact, for example:

```
ExampleBot/1.2 (+https://example.com/bot; bot@example.com)
```

That is what Wikimedia’s user-agent policy asks of automated clients, and it names curl, lwp and Python-urllib as the kind of generic agent to avoid. The other is a current browser string sent with everything that browser sends, from a client whose handshake matches. Mixing the two, a browser string over a library connection, is the worst option. Whichever you choose, keep it stable for the whole session: a client whose identity changes between requests matches no real browser.

Crawler etiquette, including how to identify yourself so operators can reach you, is in [Collecting training data for a language model](/guides/collecting-llm-training-data/). Agents that fetch on a user’s behalf have their own trade-offs, covered in [Proxies for AI agents that browse](/guides/proxies-for-ai-agents/).

**How this was captured.** 21 October 2026, macOS. Each client made one plain request to a raw TCP listener on 127.0.0.1 that recorded the request head verbatim. Chrome builds were Google Chrome 155.0.8059.85 with `--headless` and Chrome for Testing 148.0.7778.96 `chrome-headless-shell`, each with a fresh profile and no other flags.

## Frequently asked questions

### Does changing my user agent stop me being blocked?

Rarely on its own. Servers check it against the TLS handshake, the other headers and the timing, and a browser string over a library connection stands out more than the library's honest default.

### How do I see the user agent my code sends?

Point it at a local listener and read the request, as shown above. A site that echoes headers back also works, but a local listener shows the header exactly as your client wrote it, with nothing in between.

### Should I rotate user agents between requests?

Not within a session. A real browser keeps one identity. If you vary it at all, vary it between sessions and change every signal that has to match it.

## Sources

1. [RFC 9110: HTTP Semantics, the User-Agent field](https://www.rfc-editor.org/rfc/rfc9110.html#name-user-agent)
2. [Chromium: User-Agent reduction](https://www.chromium.org/updates/ua-reduction/)
3. [Wikimedia Foundation: User-Agent policy](https://foundation.wikimedia.org/wiki/Policy:User-Agent_policy)
4. [WICG: User-Agent Client Hints](https://wicg.github.io/ua-client-hints/)
