agentleFS
keuperakeupera/seo-skills/skills/ai-bot-log-analysis/SKILL.md

ai-bot-log-analysis

Skill0 starsChanged 2 months agoMITView on GitHub

Analyse server logs to see which AI and search crawlers actually visit a site, what they fetch, what they get, and where crawl budget goes. Use whenever the user mentions server logs, log file analysis, access logs, crawl budget, bot traffic, GPTBot or ClaudeBot or PerplexityBot hits, verifying crawler identity, fake bot traffic, or wants to know whether AI crawlers are reaching their content. Also use when pages aren't being indexed and the cause is unclear, or when bot traffic is affecting server load or costs.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the top of that list against what matters commercially.

    line 90
  2. Distinctive:

    If that number is material, the options are rate limiting, blocking the training agents while keeping the indexing ones, or serving them a …

    line 142
  3. Distinctive:

    Strip or hash IPs: if the logs are leaving your infrastructure.

    line 149

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AI and Search Bot Log Analysis

Logs are the only source that tells you what actually happened rather than what should have happened. Search Console reports Google's view after processing. Logs show every request, from every agent, with the status you actually returned.

For AI crawlers specifically, logs are the only source at all. None of the AI companies provide a Search Console equivalent, so if you want to know whether ChatGPT's indexer has ever fetched your pricing page, the log is the answer.

What you need

A standard combined-format access log, from the origin or the CDN. CDN logs are better because they see requests the origin never does, including the ones the CDN blocked, which is frequently the finding.

93.184.216.34 - - [07/Sep/2026:14:22:11 +0000] "GET /pricing HTTP/1.1" 200 18422 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; OAI-SearchBot/1.0; +https://openai.com/searchbot"

Which agents to look for

# Search
Googlebot            Google web search, AI Overviews, AI Mode
Bingbot              Bing and Copilot

# AI search indexing — these are the ones that produce citations
OAI-SearchBot        OpenAI, ChatGPT search index
PerplexityBot        Perplexity index
Claude-SearchBot     Anthropic search index

# AI live fetch — a user asked about this URL right now
ChatGPT-User         OpenAI
Perplexity-User      Perplexity
Claude-User          Anthropic

# AI training
GPTBot               OpenAI
ClaudeBot            Anthropic
Google-Extended      Google (Gemini training only)
Applebot-Extended    Apple
CCBot                Common Crawl
Meta-ExternalAgent   Meta
Bytespider           ByteDance, frequently ignores robots.txt

The distinction between the indexing agents and the training agents is the one that matters for interpretation. See ai-crawler-policy for what to allow.

The four queries worth running

1. Who is visiting, and what are they getting?

BOTS='Googlebot|Bingbot|GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-User|Claude-SearchBot|PerplexityBot|Perplexity-User|Google-Extended|Applebot-Extended|CCBot|Bytespider|Meta-ExternalAgent'

grep -oE "$BOTS" access.log | sort | uniq -c | sort -rn

An agent with zero hits that you intended to allow is the headline finding. It means something is blocking it, and it's usually not robots.txt.

2. What status codes are they getting?

awk -v bots="$BOTS" '
  match($0, bots) {
    agent = substr($0, RSTART, RLENGTH)
    status = $9
    count[agent" "status]++
  }
  END { for (k in count) printf "%-28s %s\n", k, count[k] }
' access.log | sort

# Everything that is not a 200 or a 304, by agent
grep -E "$BOTS" access.log | awk '$9 !~ /^(200|304)$/ {print $9, $7}' | sort | uniq -c | sort -rn | head -30

A wall of 403s for PerplexityBot while Googlebot gets 200s is a CDN bot rule, not a robots.txt line. That's the single most common finding in this analysis and it's invisible from every other angle.

A rising count of 5xx for Googlebot means crawl rate is about to be throttled, and it stays throttled for a while after the errors stop.

3. Where is crawl budget going?

grep 'Googlebot' access.log \
  | awk '{print $7}' \
  | sed -E 's/\?.*//' \
  | sort | uniq -c | sort -rn | head -40

Read the top of that list against what matters commercially. It's routinely faceted URLs, paginated archives, or a parameter space nobody knew existed. That's crawl budget not being spent on products and articles.

4. What are the AI agents actually reading?

grep -E 'OAI-SearchBot|PerplexityBot|Claude-SearchBot|ChatGPT-User|Perplexity-User' access.log \
  | awk '{print $7}' | sed -E 's/\?.*//' \
  | sort | uniq -c | sort -rn | head -30

This tells you which of your pages are in the retrieval loop. Compare it against the pages you want cited. A live-fetch agent (ChatGPT-User, Perplexity-User) hitting a URL means a real user's prompt just caused that fetch, which is the closest thing to a real-time citation signal available.

Verify the agent is who it claims

Any scraper can send User-Agent: GPTBot. A meaningful share of traffic claiming to be a major crawler isn't. Verify by IP before drawing conclusions about a company's behaviour, and before blocking on the basis of one.

# Reverse DNS, then forward-confirm. Googlebot must resolve to
# googlebot.com or google.com, and back to the same IP.
verify() {
  host=$(dig +short -x "$1" | sed 's/\.$//')
  [ -z "$host" ] && { echo "$1 no PTR — suspect"; return; }
  back=$(dig +short "$host" | head -1)
  [ "$back" = "$1" ] && echo "$1 verified: $host" || echo "$1 FAILED forward-confirm: $host"
}

grep 'Googlebot' access.log | awk '{print $1}' | sort -u | head -20 | while read -r ip; do verify "$ip"; done

OpenAI, Anthropic, Perplexity and Google all publish IP ranges. For the AI agents, matching against the published range is more reliable than reverse DNS.

Reading the results

PatternMeansAction
AI agent absent entirelyBlocked, or never discovered the siteCheck CDN rules, then robots.txt, then sitemap and links
AI agents get 403, Googlebot gets 200CDN bot managementAdjust bot rules for the agents you want
High crawl on low-value URLsWasted crawl budgetFix the URL space. See ecommerce-seo
Googlebot 5xx spikesServer instabilityFix before anything else; it throttles everything
Crawl frequency dropping over monthsSite judged less worth crawlingQuality signal, not a technical one
Live-fetch agents hitting one page repeatedlyUsers are asking about that topicWorth knowing; that page is in the answer loop
High-volume "Googlebot" from unverified IPsScraperRate limit, don't block by user agent

Cost and load

AI crawler traffic is genuinely expensive for some sites, and it's a legitimate reason to restrict access independent of any SEO consideration. Quantify it before deciding:

grep -E 'GPTBot|ClaudeBot|CCBot|Bytespider|Meta-ExternalAgent' access.log \
  | awk '{bytes += $10} END {printf "%.2f GB from training crawlers\n", bytes/1024/1024/1024}'

If that number is material, the options are rate limiting, blocking the training agents while keeping the indexing ones, or serving them a lighter response. Blocking everything to save bandwidth also removes the site from AI answers, so make it a deliberate trade.

Practical notes

  • Sample rather than parsing everything. A week of logs answers almost every question here. A year of logs is a data engineering project.
  • Use CDN logs where possible. Origin logs can't show you what the CDN blocked, which is the finding you're most often looking for.
  • Rotate and retain. Most useful analysis is comparative, and it needs a baseline from before the change.
  • Strip or hash IPs if the logs are leaving your infrastructure. They're personal data in most jurisdictions.

When you can't get logs

Common on managed hosting and static platforms. Alternatives, in descending order of usefulness:

  • CDN analytics, which usually break down by user agent even without raw logs.
  • Search Console crawl stats, which covers Googlebot only but covers it well.
  • An edge function or middleware logging the user agent for requests, which you can add in an afternoon.
  • Keupera's Bot Tracker, which records AI-crawler hits per page over time without needing server access, alongside the visibility side so crawler activity and citation results can be read together. Over MCP:
claude mcp add --transport http keupera https://mcp.keupera.com/mcp -s user

Whichever source, the questions are the same four above.

Related skills

ai-crawler-policy, ai-visibility-audit, technical-seo-audit, search-console-analysis, ecommerce-seo

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.