heuristic
headless_ua_token
family
automation.driver
severity
critical
reads
vectors.navigator.userAgent
reader
readAutomation()
since
ruleset r1

A user agent that declares itself headless

Raised when the user agent string matches /headless/i, and the full string is printed as the evidence.

If the word headless appears in the user agent your browser reports, the same token is almost certainly travelling on every request you make, because that string is normally one value read in two places. Removing it from the page property alone is the narrowest possible fix, and this rule prints the whole string so you can see what you actually changed.

What headless_ua_token reads

Chromium's headless mode has historically identified itself in the user agent with a `HeadlessChrome/` product token. The old headless implementation and the newer one differ in many ways, but both have shipped builds that announce themselves here.

This rule matches case-insensitively on the substring rather than on a fixed product token, because the point is to catch a self-declaration in any shape it arrives in — including the ones that show up in a Firefox or WebKit-derived string.

The evidence this rule prints is the entire user agent, untruncated. That matters more than the flag: a user agent is the single most-argued-about string in this business, and the reason to run the check is usually to see it.

Who reads this signal

A user agent is sent on every request, so any server can read it without running a line of JavaScript. That is a property of HTTP, not a claim about any product.

In our correspondence index this heuristic is listed alongside Imperva / Incapsula . That correspondence is our reading of which products have access to this class of signal. It is not a claim that any of them checks this, and no test against any of them has been run.

When headless_ua_token fires on an ordinary browser

A person who deliberately set a user agent containing the word for testing purposes. The rule prints the string, so the distinction is one glance away.

What a clean reading looks like

Clean is a user agent with no headless token in it, which is a much weaker statement than it sounds. The header a server receives and the string page script reads are two separate surfaces, and an override applied to navigator.userAgent does not touch the request header. A clean reading here says the page-visible string is clean; it says nothing about what your HTTP client sent.

What actually moves headless_ua_token

Setting a user agent override. Note that an override applied only to the JavaScript property does not change the `User-Agent` request header a server actually sees, and the two are separately observable.

What changing this flag does to the plan

The value column for this row is long enough to be the reason the sheet is 1080 pixels wide. When the string changes, the plan shows the prior user agent struck through above the new one at the same column, ligatures disabled, selectable character by character, which is the only way a user agent diff is readable at all. Change a Chrome major version and you will see how many other rows move with it: client hints, vendor, plugin expectations. One string is rarely one signal.

Questions about headless_ua_token

Does new headless Chrome still say HeadlessChrome in the user agent?

Builds have shipped both ways, which is why this rule matches a substring rather than a fixed product token. Treat the reading as authoritative for the browser in front of you and nothing else: the plan prints the exact string it read, so you can check what your build does rather than what a blog post said last year.

Is changing my user agent enough to look like a normal browser?

No, and this site has five other rules whose whole job is to show you why. A user agent override that is not accompanied by matching client hints, a matching vendor string, matching touch points and a plausible renderer produces contradictions that are stronger evidence than the original string was.

Does the user agent header a server sees match what JavaScript reports?

Not necessarily, and that gap is itself observable from the server side. This page can only read the JavaScript surface, so a clean reading here is a statement about one of the two. The method page lists this among the things the site cannot see.

Read next

user agent vs client hints The contradiction a one-line user agent override produces, and why it is the strongest reading in the whole ruleset.
vendor vs user agent The legacy per-engine constant that a user agent switcher forgets, and what a mismatch between the two means.
identity.consistency The six rules that compare the places a browser states its own identity, all of which read this same string.

Change what this row says

The reason user agent spoofing keeps failing is that the string is derived from a platform value that also feeds client hints, the vendor string and the request headers, and a page-level override rewrites one copy. Donut Browser derives them together at the engine level from the profile, which is the difference between changing a value and changing the thing the values come from. Download it, run the same plan inside a profile, and compare the two records.

curl -fsSL https://donutbrowser.com/install.sh | sh
Download Donut Browser macOS, Windows, Linux · AGPL-3.0 · zero telemetry · what it changes and what it does not

To see this heuristic's reading for your own browser, run the plan. Nothing on this page has read anything about you.