Back to Glossary

User agent

Definition The user agent is the string a browser or a bot sends to name itself. It is how you tell Chrome from a script, and it can be faked.

A user agent is the text a client sends to introduce itself. A browser's string names the browser and the operating system, buried in historical compatibility notes. A script's string often names the library: curl, python-requests, Go-http-client, or a crawler with bot in the name. That difference is the practical test in how to tell bots from visitors.

The string is not proof. Anything that can make an HTTP request can type "Chrome" in the header. Use it as a hint next to the URL and the speed of the hits, not as an identity. MapMyVisitors stores it with the visit so you can do that check. It does not, by itself, label the visit human.

Do not build a "supported browsers" policy on a week of user agents from one post. Do use a month of them to see whether you are pretending a browser matters that almost no one sends. The place of the visit is a separate field, from IP geolocation, and the two can disagree in interesting ways: a Chrome user agent and a datacenter country is worth a second look.