Classify each request in layers: read the user agent, verify the IP for any bot you want to count as real, check cadence and headers, then look at status codes. No single field settles it. Some AI product fetches are user-triggered and can look like ordinary browser requests, so a share of your traffic will stay "unknown" no matter how careful you are.

This guide assumes you have raw access logs (nginx, Apache, a CDN export) and an analytics tool, and you want to know which hits on the same URLs and dates came from crawlers and which from people.

Why the two data sources disagree

Server logs record every HTTP request. Most analytics tools record only requests that ran their JavaScript tag, so many crawlers never show up there. When a URL has 400 log hits and 90 analytics sessions on the same day, the gap is not an error. It is a mix of crawlers, prefetches, blocked scripts and real visitors who declined tracking.

Use logs to classify bots. Use analytics only to see what humans did. Do not try to reconcile the two counts to the unit.

Step 1: Group by user agent

Start with a count of user agents for the date range and URLs you care about. This works on the nginx or Apache combined log format:

awk -F'"' '{print $6}' access.log | sort | uniq -c | sort -rn | head -40

To filter to one path:

grep ' /pricing ' access.log | awk -F'"' '{print $6}' | sort | uniq -c | sort -rn

Vendors document the names their crawlers use. Google says its crawlers use identifiable user-agent names and known internet addresses [3]. OpenAI publishes user agents for GPTBot, OAI-SearchBot, OAI-AdsBot and ChatGPT-User [6]. Match those tokens first and label the hits "claimed bot."

The user agent is a string the client chooses. Anyone can send "GPTBot" from a laptop. Treat it as a claim, not proof.

Step 2: Verify the IP for claimed bots

Verification is what turns "claimed" into "confirmed." Two methods are documented:

  • Reverse DNS. Google recommends verifying Googlebot by reverse DNS lookup on the source IP, or by matching the IP against Googlebot's published ranges [4]. Cloudflare says it also verifies suspected bots with reverse DNS lookup or IP validation [5].
  • Published IP lists. OpenAI publishes IP addresses for GPTBot, OAI-SearchBot, OAI-AdsBot and ChatGPT-User [6].

Extract the IPs for a claimed bot and compare them to the vendor's list:

grep 'GPTBot' access.log | awk '{print $1}' | sort | uniq -c | sort -rn

Any IP outside the published ranges that sends a bot user agent is a spoof. Put it in its own bucket, "fake bot," not in the AI crawler total. The step-by-step version of this check is in How to Verify GPTBot and Other AI Crawlers in Your Server Logs.

If your site sits behind a CDN or proxy, make sure your log field holds the client IP and not the proxy's. Otherwise every IP check fails.

Step 3: Look at cadence

Cadence is a general-practice signal, not a documented vendor fact. Patterns that usually point to automation:

  • Many distinct URLs fetched in a short window from one IP or range.
  • Near-constant spacing between requests.
  • Requests for /robots.txt first, then a sweep of pages, with no images, CSS or JS fetched.
  • Hits on URLs no link points to, such as old sitemap entries.

Patterns that usually point to people: a page request followed by its assets, irregular gaps, and navigation that follows internal links.

Cadence helps with unlabeled traffic, such as a scraper with a browser user agent. It can misfire: a person opening ten tabs looks bursty, and a polite crawler can look slow and irregular.

Step 4: Check headers

Real browsers send a typical set of headers: Accept-Language, Accept-Encoding, often Referer, and on modern browsers the Sec-Fetch-* family. Simple scripts often omit them. AWS says static bot controls evaluate request headers and IP address, which makes them useful for low-sophistication bot traffic but not a complete classifier [7]. Headers catch lazy bots. They do not catch a bot that copies a real browser's headers.

Log the headers you need. The default combined format keeps only the referrer and user agent, so you may need a custom log_format to see the rest.

Referrer spam and fake AI referrers

The Referer header is also client-supplied. Fake referrers appear in analytics as visits "from" a domain that never sent anyone. If you see a referrer that claims an AI product but the request has no matching user-triggered pattern, treat it as unverified. Signs of spam: a hit on a single URL with no assets, zero engagement, an odd hostname, or the same referrer across unrelated IP ranges. Filter these in analytics by hostname and referrer rules, and keep the raw log line for the audit trail. For why AI referrals are hard to see in Google's own tools, see Search Console and ChatGPT: Why AI Referral Traffic Isn't There.

Step 5: Read status codes as supporting evidence

Status codes describe what your server did, not who asked. RFC 9110 defines 304 Not Modified as a conditional request result, and 403 Forbidden and 404 Not Found as ordinary status codes that can appear in logs for many reasons [2]. Use them like this:

  • 304: the client sent a conditional request, so it has seen the page before. Browsers do this, and so do some crawlers. Not decisive.
  • 403: may be your own WAF or bot rule firing. A pile of 403s against one user agent tells you your rules are working, not what the client was.
  • 404: many 404s across URLs that do not exist suggests scanning or a crawler working from a stale list. A human typo yields one or two.
  • **200 on /robots.txt:** the client fetched your crawl rules. Fetching them says nothing about obeying them. RFC 9309 describes robots.txt as a crawl-control protocol, not a security mechanism [1].

More on what each code tells a crawler is in HTTP Status Codes for SEO and AI Crawlers.

Decision table

EvidenceVerdictConfidence
Documented bot token and IP in the vendor's published list or reverse DNS passesVerified crawlerHigh
Documented bot token, IP not in list, reverse DNS failsSpoofed botHigh
Bot token, no way to verify (no list, no DNS method)Claimed botMedium
Browser user agent, bursty fetches, no assets, no Accept-LanguageLikely automationMedium
Browser user agent, full asset loading, irregular timing, analytics event firedLikely humanMedium
Browser user agent, normal headers, one page, no analytics eventUnknownLow
AI-product referrer with no other supportUnverifiedLow

Keep "unknown" as a real category. Forcing it into bot or human adds noise to both.

What you can't classify safely

Some AI product fetches are triggered by a user and can look like normal browser requests. In our reading of the public documentation, there is no guarantee that every such fetch carries a distinctive user agent or comes from a list you can check. OpenAI documents that ChatGPT-User is used for user actions in ChatGPT and Custom GPTs, is not used for automatic crawling, and may visit pages when a user asks ChatGPT to open a page [6]. That agent has a published user agent and IP addresses, so you can verify it [6]. Other products may not offer the same.

Where a fetch has no documented identity, headers alone cannot separate it from a person. Count it as unknown. Do not report it as human traffic, and do not report it as AI traffic.

Also note that a user-triggered fetch and a crawl are different events. Blocking one in robots.txt does not necessarily affect the other. For one vendor's split, see PerplexityBot vs Perplexity-User.

Reporting without false precision

  • Report buckets: verified crawler, spoofed, claimed, likely automation, likely human, unknown.
  • Show counts per bucket for the same date range and URLs, and say which buckets are verified.
  • Do not turn the "unknown" bucket into a percentage of AI traffic.
  • Keep the raw logs. Vendors change user agents and IP lists, and you will want to reclassify old data.

What to do next

  1. Run the user-agent count for your top 20 URLs and the last 30 days.
  2. Verify the IPs for every claimed bot token against vendor lists or reverse DNS, and move failures to "spoofed."
  3. Add Accept-Language and Sec-Fetch-Site to your log format so header checks are possible.
  4. Create an "unknown" bucket and keep it in every report.
  5. If you want to block rather than just classify, remember that robots.txt only asks. robots.txt Is Not a Privacy Control covers the controls that enforce.