Sub topic 14
Checking what crawlers actually do
Standards describe what a crawler should do. Server logs record what it did. This chapter shows how to read your access logs to find out which AI crawlers visit your site, what they request, and whether anyone fetches llms.txt. It then covers the limits of that evidence.
Prerequisites
This chapter assumes you can do the following:
- You can read a basic web server access log.
- You know what a user-agent string is.
- You have read the chapters on robots.txt and AI crawler tokens, so you know the difference between training, search and user-triggered fetching.
- You can use
grepand run short Python scripts.
Why logs are the ground truth
A published file such as llms.txt or robots.txt states your intent. It does not tell you who read it. Your server sees every request, so the access log is the one record you control that shows actual behavior.
Logs can answer questions like these:
- Which AI crawlers visited, and how often?
- Did a crawler request
robots.txtbefore it requested pages? - Did any crawler request
/llms.txtor/llms-full.txt? - Did a crawler you disallowed fetch pages anyway?
- Are claimed crawlers really who they say they are?
The last question matters most. Anyone can put "GPTBot" in a user-agent header.
The shape of a log line
Most servers use the combined log format. Here is one line from a crawler:
203.0.113.7 - - [29/Nov/2026:09:58:12 +0000] "GET /llms.txt HTTP/1.1" 200 412 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.1; +https://openai.com/gptbot)"The fields you need are:
| Field | Example | Use |
|---|---|---|
| Client IP | `203.0.113.7` | Verifying the crawler's identity |
| Timestamp | `[29/Nov/2026:09:58:12 +0000]` | Spotting patterns over time |
| Request | `"GET /llms.txt HTTP/1.1"` | What was fetched |
| Status | `200` | Whether the fetch succeeded or was blocked |
| User-agent | `GPTBot/1.1` | The claimed identity |
The user-agent is a claim made by the client. The IP address is harder to fake, and you use it to check the claim.
First queries with grep
The simplest check looks for requests to llms.txt from known AI crawlers:
# Which AI crawlers requested llms.txt?
grep "GET /llms.txt" access.log | grep -E "GPTBot|ClaudeBot|OAI-SearchBot|PerplexityBot"
# How many requests did one crawler make in total?
grep -c "GPTBot" access.logThe first command prints each matching line. If it prints nothing, none of those four crawlers requested the file in the period covered by the log. The second command counts every request whose line contains "GPTBot", not just those to one path.
Check the log's time range before drawing a conclusion. A log rotated yesterday says little about the last quarter. Look at the first and last timestamps:
head -n 1 access.log
tail -n 1 access.logCounting crawlers with Python
For a summary across many crawlers, a short script is easier than chained grep calls. This script reads a combined-format log and counts requests per AI crawler. It also counts how many of those requests hit /llms.txt and /robots.txt.
import re
import sys
from collections import Counter
AI_AGENTS = [
"GPTBot",
"OAI-SearchBot",
"ChatGPT-User",
"ClaudeBot",
"Claude-User",
"PerplexityBot",
"CCBot",
"Google-Extended",
"Bytespider",
]
# Combined log format: ip ident user [time] "METHOD path PROTO" status size "referer" "agent"
LINE = re.compile(
r'^(?P<ip>\S+) \S+ \S+ \[(?P<time>[^\]]+)\] '
r'"(?P<method>\S+) (?P<path>\S+) [^"]*" '
r'(?P<status>\d{3}) \S+ "[^"]*" "(?P<agent>[^"]*)"'
)
total = Counter()
llms = Counter()
robots = Counter()
with open(sys.argv[1], encoding="utf-8", errors="replace") as log:
for line in log:
m = LINE.match(line)
if not m:
continue
agent = m.group("agent")
for name in AI_AGENTS:
if name.lower() in agent.lower():
total[name] += 1
if m.group("path") == "/llms.txt":
llms[name] += 1
if m.group("path") == "/robots.txt":
robots[name] += 1
break
print(f"{'crawler':<16}{'total':>8}{'robots.txt':>12}{'llms.txt':>10}")
for name in AI_AGENTS:
if total[name]:
print(f"{name:<16}{total[name]:>8}{robots[name]:>12}{llms[name]:>10}")Run it with python crawlers.py access.log. Lines that do not match the pattern are skipped, so a custom log format will produce empty output. If that happens, adjust the regular expression to your format.
Note that Google-Extended is a robots.txt control token, not a separate crawler. Google does not send requests with that user-agent, so you should expect it to show zero hits in your logs. Its rule is honored by Google's existing crawlers. Keeping it in the list is a reminder that some tokens never appear in logs.
What to look for
Once you have counts, compare them with what you expect.
- Robots.txt fetches. A well-behaved crawler requests
/robots.txtbefore crawling pages and re-requests it periodically. A crawler that fetches many pages and neverrobots.txtis ignoring the protocol, or is cached from an earlier visit outside your log window. - Compliance with your rules. If you disallowed
GPTBotand the log showsGPTBotrequests to disallowed paths after the rule was published, either the crawler ignores the rule or the user-agent is forged. Verification, covered below, tells you which. llms.txtrequests. Compare the number of requests to/llms.txtagainst requests to/robots.txtand/sitemap.xml. Many sites findllms.txtrequested rarely or never by the major AI crawlers. Treat that as a finding about your site and your time window, not a general claim.- User-triggered fetches. Agents such as
ChatGPT-Userfetch a page because a person asked an assistant about it. Their volume tracks user questions, not crawl schedules, and they may not consult robots.txt the way a scheduled crawler does. Read each vendor's documentation for its current behavior. - Status codes. A
403or429for a crawler means your enforcement layer blocked or throttled it. A200means it got the content.
flowchart TDThe diagram below summarizes the decision process.
Verifying that a crawler is real
User-agent strings are trivial to forge. Scrapers often copy the strings of well-known crawlers because many sites allow them. Two methods verify identity.
Published IP ranges. Several operators publish lists of the addresses their crawlers use, usually as JSON files linked from their crawler documentation. Download the current list and check whether the client IP falls inside it. This script does that check with the standard library:
import ipaddress
import json
import sys
# ranges.json: {"prefixes": [{"ipv4Prefix": "203.0.113.0/24"}, ...]}
with open(sys.argv[1], encoding="utf-8") as f:
prefixes = json.load(f)["prefixes"]
networks = [
ipaddress.ip_network(p.get("ipv4Prefix") or p.get("ipv6Prefix"))
for p in prefixes
]
client = ipaddress.ip_address(sys.argv[2])
print(client, any(client in net for net in networks))Run it as python verify.py ranges.json 203.0.113.7. The file format differs between vendors, so adapt the key names to the list you download. The address 203.0.113.7 is from a documentation range and is used here only as an example.
Reverse and forward DNS. Some operators, notably Google for Googlebot, document a DNS check. You resolve the client IP to a hostname with a reverse lookup, confirm the hostname is in the operator's domain, then resolve that hostname forward and confirm it returns the original IP. Both steps are needed, because an attacker who controls the reverse DNS for their own address can return any name. Use whichever method the vendor documents, and re-download IP lists regularly because they change.
Limits of log evidence
Logs show requests that reached your server. Several things stay invisible or ambiguous.
- CDN and cache hits. If a CDN answers from cache, the request may never reach the origin log. Collect logs at the edge as well, or you will undercount.
- Training versus use. A log shows a fetch. It does not show whether the content went into a training set, a search index, or a one-off answer. You learn that from the vendor's documentation of each token, not from your logs.
- Citations. A fetch does not mean a citation. A crawler can visit every page and the assistant can still never mention your site.
- Missing requests. Not seeing
llms.txtrequests in a short window does not prove nobody will read it later. It does mean you have no evidence of use yet. - Shared infrastructure. Some crawlers run from cloud provider ranges that also host unrelated clients. IP checks against a vendor's own list avoid this problem. IP checks against a cloud provider's list do not.
Turning observations into decisions
Logs feed back into the decision checklist in the final chapter. A reasonable routine:
- Collect at least 30 days of logs from every layer that serves your site.
- Run the summary script and record the counts per crawler.
- Verify the top crawlers by IP.
- Compare behavior with your
robots.txtrules. - Note whether
llms.txtwas requested, by whom, and how often. - Repeat after any change, and compare with the earlier baseline.
If you publish llms.txt and the logs show verified crawlers fetching it, you have evidence it is being consumed. If they do not, the file costs little to keep, but you should not credit it with any change in traffic or citations.
Summary
- Server logs are the only direct record of crawler behavior on your site.
- A user-agent is a claim. Verify identity with IP ranges or DNS checks.
- Compare robots.txt fetches, path requests and status codes with what you published.
- Logs show fetches, not training use or citations.
- Absence of
llms.txtrequests is a finding to record, not a failure to fix.
Exercise
Your log shows 400 requests with a "GPTBot" user-agent to paths your robots.txt disallows for GPTBot. The client IPs are not in OpenAI's published ranges. Is GPTBot ignoring robots.txt? What should you do?
Show answer
Not necessarily. Because the IPs are outside the published ranges, the traffic is probably not GPTBot. Someone is likely forging the user-agent. Robots.txt will not stop them. Treat the traffic as an unverified scraper and use enforcement controls such as rate limiting, WAF rules, or blocking by IP range, rather than adding robots.txt rules.
Exercise
Your 30-day log shows no requests to /llms.txt from any verified AI crawler, but your CDN serves the file from cache. What should you check before concluding that nobody fetches it?
Show answer
Check the CDN or edge logs. Cached responses may never reach the origin server, so the origin log undercounts requests. Also confirm that the 30-day window covers the whole period and that your log format parsed correctly.