Sub topic 12
Reading Logs to See Who Is Crawling
Assume you understand HTTP requests, the User-Agent header, and basic command-line use. This chapter uses a combined-format web access log. Your server may use a different format, so first confirm which fields it records.
What an access log can tell you
An access log records requests that reach your web server. A useful entry normally includes:
- The client IP address.
- The request time.
- The HTTP method and path.
- The response status, such as
200or403. - The response size.
- The
Refererheader. - The
User-Agentheader.
The User-Agent is the main signal for recognizing a declared crawler. Tokens such as GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, and PerplexityBot identify different clients or purposes.
| Token | What the log may indicate |
|---|---|
| `GPTBot` | OpenAI crawler associated with training-related collection |
| `OAI-SearchBot` | OpenAI crawler for search results |
| `ChatGPT-User` | A fetch made for a ChatGPT user request |
| `Google-Extended` | A Google policy token, not normally a request User-Agent |
| `ClaudeBot` | Anthropic crawler |
| `PerplexityBot` | Perplexity crawler |
Google-Extended usually does not appear as a visiting client. It is a control token used in robots.txt to express whether Google may use content for certain generative AI purposes. Inspect Googlebot requests separately when checking Google traffic.
Count declared AI crawlers
For a combined-format log, this pipeline extracts known tokens and counts them:
grep -Eio 'GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|PerplexityBot|CCBot|Applebot-Extended' access.log \
| sort | uniq -c | sort -rnA result such as 42 GPTBot means that the text GPTBot appeared in 42 matching log entries. It does not prove that 42 legitimate GPTBot requests occurred. A client can copy another crawler's name, and one request can include unusual text in a header or URL.
To see the complete matching entries, including paths, status codes, and IP addresses, run:
grep -Ei 'GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|PerplexityBot|CCBot|Applebot-Extended' access.logReview whether blocked requests received the expected status. A 403 response suggests that a server rule rejected the request. A 200 response means the server returned the resource, although a later proxy or application rule may have affected what the client received.
Compare logs with your policy
Use the log to answer specific questions:
- Which declared crawlers visited?
- Which paths did they request?
- Did they receive
200,403,404, or another status? - Did they request paths covered by
Disallowrules? - Did their request rate create an operational problem?
- Did the same IP address use several unrelated user-agent strings?
A crawler that requests /members/ despite a rule for that path may be ignoring robots.txt, or it may have fetched a cached copy before the rule changed. A request alone does not prove that the crawler accessed the page successfully. Check the response status and your server's access controls.
Investigate suspicious traffic
For stronger verification, group requests by both user-agent and source IP:
awk '$0 ~ /GPTBot|OAI-SearchBot|ClaudeBot|PerplexityBot/ {
print $1, $0
}' access.log | sortIn this example, field $1 is assumed to be the client IP. Verify that assumption against your log format. If your site uses a reverse proxy, $1 may be the proxy's address rather than the original client.
A claimed crawler should be checked against the publisher's documented IP ranges or reverse DNS guidance when available. Do not treat reverse DNS alone as proof. Keep server-side blocking for clients that ignore robots.txt, but avoid blocking an entire provider based on one unverified request.
Maintain useful monitoring
Review crawler traffic after publishing a new robots.txt, changing server rules, or launching an important section. Save counts by day so you can see trends rather than relying on one snapshot. Log rotation can remove old evidence, so send selected metrics to a system with an appropriate retention period.
Exercise
A request identifies itself as GPTBot, requests /drafts/guide, and receives status 403. What can you conclude, and what can you not conclude?
Show answer
You can conclude that a client claiming to be GPTBot reached the server and received a denial for that request. You cannot conclude from the User-Agent alone that the client was operated by OpenAI, or that every request from it was blocked.