Skip to content

Blog

How we tell a bot from a human

A list of known bots is not enough. Lunaboard combines the browser header, IP address, signs of automation, browser version and behavior on the page.

Separating humans from bots is the main promise of Lunaboard. One sign is not enough for that, so we combine several. This article describes exactly what happens when each pageview is received.

Why a list of bots is not enough

The simplest filter compares the User-Agent header with a list of known bots. It catches Googlebot and GPTBot, because they identify themselves honestly. However, it does not catch a script that pretends to be an ordinary Chrome, or an automated browser that runs JavaScript normally.

Six checks in a fixed order

One class makes the decision and the checks run one after another. The first one that succeeds determines both the result and the reason. You then see the reason in the application.

  1. Empty header. A request without a User-Agent header was not sent by the browser of a human.
  2. Known bot. We compare the header with a list of bots: search engines, AI bots, SEO tools, link previews, monitoring services and scanners. For each one, we record the operator and the purpose.
  3. Automated browser. HeadlessChrome, Puppeteer, Playwright or Selenium in the header. A pageview for which the tracking script found signs of automation in the browser is evaluated in the same way.
  4. Library or script. curl, python-requests, Go-http-client and similar tools. The request does not come from a browser.
  5. Generic signs. Words such as bot, crawl or spider in the header, and also a header that does not start with the usual "Mozilla/".
  6. Address from a data center and an old browser version. A visit from the ranges of large cloud providers is not a human at a computer. Almost nobody uses Chrome, Firefox or Edge in a version older than 90 today, but such headers appear in scripts with a copied old string.

Whatever passes none of these checks is, for now, a candidate for a human.

The last filter: behavior

A pageview is counted among humans only when the visitor does something on the page: moves the mouse, scrolls the page or touches the screen. At that moment, the tracking script sends a short signal, and the signal applies to the whole visit.

A bot that only loads the page and leaves therefore stays outside the humans column, even if it passed all the previous checks. In the application, it has the reason "no movement, scrolling or touch".

Spoofed bots

A header can contain anything. A scanner can identify itself as GPTBot and hope that the website lets it through. Some bot operators therefore publish the ranges of IP addresses from which their bots come. Lunaboard downloads these lists regularly and marks a request with a known header from an address outside them as spoofed.

We record spoofed bots as one summary number. We do not store the pages they went through, so that they do not distort the overview of real AI bots.

One more alert is related to this. When five or more different AI bots have almost the same number of requests in a day, it is most likely not five bots but one scanner that rotates headers. Lunaboard points this out on the Visibility page.

We do not discard bots

No request is discarded because it comes from a bot. Bots have their own column next to humans, and for each one you can see how many requests it made and how much data it transferred. On one website from our portfolio, bots made 79.7% of all requests in 30 days. Such a share is worth seeing.

Where the limits are

Bot recognition is not infallible. A well-written bot that uses a real browser from a home connection and moves the mouse will pass. Conversely, a human who opens a page in the background and never looks at it is not counted among humans. The numbers in Lunaboard are therefore an estimate that is closer to reality than a simple count of pageviews, not an exact count of people.

All articles

More articles

Why we are building Lunaboard

We operate a portfolio of websites and lacked one place to see what happens on them. Four reasons why we started building Lunaboard.

AI bots: who reads your website

AI bots do three different things: they collect training data, build a search index and fetch pages for a user question. How to measure them and read the numbers.