Tutorial · Practitioner
Reading Server Logs for AI Bot Visits
To see AI bot visits, filter your server or CDN access logs for AI user agent tokens such as GPTBot, OAI-SearchBot, ChatGPT-User, PerplexityBot, ClaudeBot and Claude-SearchBot, verify the IPs against each company's published lists, then check which URLs they request and what response codes they get. Analytics tools won't show this, because crawlers don't run tracking scripts. This tutorial walks through the process with example commands.
Key takeaways
- Logs are the only reliable view of crawler access.
- Always pair user agent filters with IP verification.
- Response codes matter more than request counts: 403s and 5xx errors mean blocked access.
- Turn findings into a weekly count and a monthly review.
Where do your logs live?
| Setup | Where to look |
|---|---|
| Apache | Access log, typically configured via CustomLog (Apache docs) |
| Nginx | access_log file, often /var/log/nginx/access.log |
| CDN (Cloudflare, Fastly, Akamai, etc.) | The CDN's log export or analytics; often the most complete view |
| Managed hosting / platforms | Host dashboard or log drain |
If you use a CDN, its logs matter most: blocked requests may never reach your origin server.
Step 1: Which user agents should you filter for?
Start with tokens documented by the AI companies:
GPTBot|OAI-SearchBot|ChatGPT-User|OAI-AdsBot|PerplexityBot|Perplexity-User|ClaudeBot|Claude-SearchBot|Claude-User|Googlebot|bingbotSources: OpenAI, Perplexity, Anthropic, Google, Bing. Google-Extended won't appear, because it has no separate user agent (Google).
Step 2: How do you count visits by bot?
For a standard combined-format log, a quick shell count:
grep -Eo 'GPTBot|OAI-SearchBot|ChatGPT-User|PerplexityBot|Perplexity-User|ClaudeBot|Claude-SearchBot|Claude-User' access.log \
| sort | uniq -c | sort -rnAnd response codes per bot (in combined log format the status is the ninth field):
grep 'OAI-SearchBot' access.log | awk '{print $9}' | sort | uniq -cLog formats vary, so check your field positions first.
Step 3: How do you verify the bot is real?
| Company | How |
|---|---|
| OpenAI | Compare IPs with openai.com/searchbot.json, gptbot.json, chatgpt-user.json |
| Perplexity | perplexity.ai/perplexitybot.json and perplexity-user.json |
| Anthropic | Published IP list linked in its help article |
| Reverse DNS then forward DNS, or Google's IP lists (Google) |
A request claiming to be a bot from an unlisted IP is an impersonator. Separate these in your counts, or your analysis will be wrong.
Step 4: Which questions should the logs answer?
- Can each search crawler reach the site? Mostly 200 responses, few 403s.
- Which sections do they crawl? Group URLs by folder.
- Are important pages crawled? Check your top commercial and guide pages.
- Are they wasting time? Look for parameter URLs, redirects and 404s.
- Are user-initiated fetchers appearing? ChatGPT-User, Perplexity-User and Claude-User often indicate real users asking about specific pages.
Worked example
Illustrative data, not real. A week of logs for a mid-size site:
| Bot | Requests (verified) | 200 | 403 | 404 |
|---|---|---|---|---|
| OAI-SearchBot | 1,240 | 1,180 | 0 | 60 |
| PerplexityBot | 310 | 40 | 270 | 0 |
| ClaudeBot | 890 | 0 | 0 (robots.txt disallow; no page requests) | - |
| ChatGPT-User | 95 | 95 | 0 | 0 |
Findings: PerplexityBot is mostly blocked by the CDN (fix firewall); OAI-SearchBot hits 60 broken URLs (fix internal links); ChatGPT-User traffic clusters on the pricing page (users are asking about pricing; make sure it's accurate).
Step 5: How do you build a weekly report?
Automate a small table: requests and response codes per verified bot, top 10 URLs per bot and week-on-week change. Alert on:
- Any search crawler's 403 or 5xx share above a threshold you set.
- A bot's requests dropping to zero.
- A large spike from an unverified "bot".
What about privacy?
Access logs contain IP addresses, which can count as personal data under laws such as the GDPR. Keep AI bot analysis within your existing log retention policy, filter to bot traffic early in your pipeline, and share aggregated tables rather than raw logs. Bot IPs from published ranges belong to companies, but your logs also contain human visitors.
How does this connect to GEO results?
Crawl access is a precondition, not a guarantee. Combine log data with your prompt tracking: if a page is never requested by OAI-SearchBot, it's unlikely to be cited in ChatGPT search; if it's crawled regularly but never cited, the issue is more likely content or competition.
Treat logs as the access layer of your GEO measurement stack: they tell you whether you can be seen, while prompt tracking tells you whether you are.
Common mistakes
- Looking at origin logs when the CDN blocks requests upstream.
- Counting unverified user agents as real bots.
- Confusing robots.txt fetches with page crawls; OpenAI may mark robots.txt requests in the user agent.
- Treating crawl volume as a visibility score.
Checklist
- [ ] Access to CDN and origin logs
- [ ] User agent filter list maintained
- [ ] IP verification for each company
- [ ] Weekly counts and alerts
- [ ] Monthly review against prompt tracking
Where to go next
Sources
- Apache, Log files
- OpenAI, Overview of OpenAI crawlers
- Perplexity, Perplexity crawlers
- Anthropic, Crawler help article
- Google, Verifying Googlebot
Questions
Where do I find server logs?
On your web server (e.g. Apache or Nginx access logs), in your CDN's log or analytics product, or from your host's dashboard.
Does Google Analytics show bot visits?
No. GA4 filters known bot traffic, and crawlers don't run analytics scripts. You need server or CDN logs.
How often should I review AI bot logs?
Weekly automated counts, with a deeper monthly review, works for most sites.