WebmasterID logoWebmasterID
User agents

User agents in server logs

Most web servers record the User-Agent header of every request in their access logs. That field is a primary source for understanding who and what reaches your site, but it is self-reported by the client, so it can be blank, generic, or spoofed. Reading server-log user agents well means treating them as claims to corroborate, not facts.

Verified against primary sources

What the field captures

Standard web-server log formats include a field for the User-Agent header exactly as the client sent it. That makes access logs the canonical place to see the raw user agent for every request, including bots that never appear in client-side analytics.

This server-side vantage point is valuable: JavaScript-based analytics miss many automated clients entirely, while the log records them. The user agent is one column among several — method, path, status, referrer — that together describe each request.

Why it is a claim, not proof

The user agent is supplied by the client, so it can be empty, a generic default, or a deliberately copied browser string. A request can say it is a major browser while being a script, and a real browser can be configured to send an unusual string.

Read the field as a strong hint to corroborate. Where authenticity matters — for example a request claiming to be a major search or AI crawler — verify against the operator's published verification method rather than trusting the string. Watch too for truncation introduced by storage or log formats, which can corrupt the value.

How it appears in analytics and logs

The user agent in a log line is whatever the client sent. A browser-like string suggests a browser, a library token suggests automation, and a blank suggests a minimal client — but each is a claim, not verified identity.

Diagnostic use case

Understand what the user-agent field in access logs represents, recognise its limits, and combine it with other signals before acting on it.

What WebmasterID can help detect

WebmasterID captures the user agent server-side per request, the same field your access logs record, and classifies it deterministically into browser, crawler, or automation so you do not have to parse raw logs by hand.

Common mistakes

Privacy and accuracy notes

A logged user agent describes a client, not a person. It should be treated as coarse, non-identifying metadata; pairing it with other data to single out individuals is fingerprinting and outside privacy-safe practice.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.