All articles
Guides / July 22, 2026

Log file analysis for SEO and AI search: a practical guide

16 min read
On this page

Log file analysis is the practice of reading your server’s access logs to see exactly which pages search engines and AI crawlers request, how often, and what response they receive. It is the only source that records real crawler behaviour rather than a simulation of it. Every other technical SEO tool estimates what a bot might do; your logs record what it actually did.

That distinction matters more now than it has in years. Alongside Googlebot, your server is being visited by GPTBot, ClaudeBot, PerplexityBot and a growing list of AI crawlers that feed answer engines. Most analytics platforms never see them.

Read your logs well and you can protect crawl budget, catch wasteful crawl patterns, and understand which pages feed AI search. This guide covers what log files are, how to analyse them, and how to apply the findings to both classic SEO and generative engine optimization (GEO).

What is a log file?

A log file is a plain-text record your web server writes for every request it receives, one line per request. Each time a browser, search crawler, or AI bot asks for a page, image, or script, the server appends an entry describing who asked, what they wanted, and how the server responded.

Unlike JavaScript analytics, which run in the visitor’s browser, log files are written server-side. That means they capture requests from clients that never execute JavaScript, which includes nearly every crawler and bot. A log file is the ground truth of what reached your server.

Two log types matter for this work. Access logs record client requests and are the primary source for SEO. Error logs record server-side faults and are useful when diagnosing why crawlers hit 5xx responses. Most of this guide concerns access logs.

A typical access log line in the Combined Log Format looks like this:

66.249.66.1 - - [22/Jul/2026:09:14:07 +0000] "GET /products/blue-widget HTTP/1.1" 200 5320 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

Each field carries a distinct piece of the story. Here is what those fields mean.

FieldExample valueWhat it tells you
Client IP66.249.66.1The requesting address; used to verify a crawler is genuine
Timestamp[22/Jul/2026:09:14:07 +0000]When the request happened; reveals crawl frequency and timing
Request method + pathGET /products/blue-widgetWhich URL was requested and how
Status code200How the server responded (success, redirect, error)
Bytes sent5320Response size; large or tiny values can flag problems
Referrer"-"The page that led here, if any
User agentGooglebot/2.1The self-declared identity of the client

The user agent and IP together are the two fields that identify who is crawling. Everything downstream depends on reading them correctly.

What is log file analysis?

Log file analysis is the process of parsing, filtering, and interpreting those raw log lines to understand crawler and visitor behaviour at scale. A single line is trivial to read; a busy site produces millions of them per day, so analysis means aggregating them into patterns you can act on.

The work usually involves collecting the log files from your server or CDN, filtering them down to the requests you care about (typically bot traffic), and grouping the results by URL, crawler, status code, or date to surface trends. The output answers questions like which sections a crawler favours, which URLs return errors, and how crawl activity changes over time.

For SEO specifically, analysts often organise findings into three areas. Health covers the status codes crawlers receive and whether they can reach content at all. Crawl budget covers how a search engine distributes its finite requests across your URL space. Freshness covers how quickly important pages get recrawled. Each of these is invisible without log data.

The next section covers why these insights are worth the effort.

Why log file analysis matters for SEO

Log file analysis matters because it shows how search engines actually spend their limited attention on your site, letting you redirect that attention toward pages that earn rankings. No crawl simulator or third-party estimate can tell you where Googlebot really went; only your logs can.

The concept that ties most of this together is crawl budget: the number of URLs a search engine will request from your site in a given period. Google assigns crawl budget based on your site’s size, health, and popularity, and it is effectively finite. When a crawler wastes requests on junk URLs, it has fewer requests left for the pages you want indexed.

Consider a 40,000-page ecommerce catalogue where faceted navigation generates filter combinations like ?color=blue&size=large&sort=price. Logs might show Googlebot spending 70% of its requests on these parameter permutations while important category and product pages go days without a recrawl. You cannot see that misallocation in Search Console’s aggregate crawl stats, but every one of those wasted requests is itemised in your logs.

Log analysis surfaces problems that other tools miss entirely:

  • Crawl waste on low-value URLs. Faceted navigation, session parameters, internal search results, and infinite calendars can absorb the bulk of crawl activity.
  • Error responses served to bots. A cluster of 404 or 500 responses to Googlebot signals broken links or server instability that erode crawl efficiency.
  • Orphan and under-crawled pages. Important URLs that appear rarely (or never) in logs are not being discovered or refreshed.
  • Redirect chains and loops. Multiple 301 hops waste crawl budget and dilute link signals; logs show the full sequence a bot walked.
  • Recrawl frequency by section. Comparing crawl dates across templates shows whether your money pages get the attention they need.
  • Crawl response to changes. After a migration or a new section launch, logs confirm whether crawlers actually found and processed the new URLs.

For small sites crawl budget is rarely a constraint, but the health and error findings still apply. For large sites, log analysis is often the single highest-leverage technical SEO exercise available. Those same signals now carry over to AI search, which is where the picture gets more interesting.

How AI crawlers show up in your logs

AI crawlers appear in your logs exactly like search crawlers do, as request lines carrying a distinct user-agent token, and reading them is how you learn whether answer engines can see your content. This is the part most analytics setups miss completely, because AI bots do not run JavaScript and never trigger browser-based tracking.

There are three broad categories of AI crawler, and the distinction changes how you interpret each visit:

  • Training crawlers fetch content to train large language models. GPTBot (OpenAI), ClaudeBot (Anthropic), CCBot (Common Crawl), and Applebot-Extended (Apple) fall here. Blocking them keeps your content out of future model training but does not affect live answers.
  • Search-index crawlers build the retrieval index that answer engines query in real time. OAI-SearchBot and PerplexityBot maintain the databases behind ChatGPT search and Perplexity. These are the ones that most directly affect AI search visibility.
  • User-triggered fetchers retrieve a page in real time because a person asked a question that references it. ChatGPT-User and Perplexity-User act on live prompts, so seeing them in your logs is a signal your content is being surfaced in active conversations.

Search Console and GA4 will not report any of this. The only way to know whether GPTBot is crawling your pricing page, or whether PerplexityBot keeps hitting a 404, is to read the raw logs. Here are the tokens to filter for.

User-agent tokenOperatorTypeWhat it means
GPTBotOpenAITrainingCollecting content for model training
OAI-SearchBotOpenAISearch indexBuilding ChatGPT search’s citation index
ChatGPT-UserOpenAIUser fetchLive retrieval triggered by a user prompt
ClaudeBotAnthropicTraining / retrievalFetching content for Claude
PerplexityBotPerplexitySearch indexIndexing pages for Perplexity’s engine
Perplexity-UserPerplexityUser fetchFetching a page a user’s query referenced
Google-ExtendedGoogleTraining policyOpt-out token for Gemini training (via Googlebot)
BytespiderByteDanceTraining / searchFeeds TikTok search and AI features
CCBotCommon CrawlTrainingBuilds open datasets used across many AI projects
Meta-ExternalAgentMetaTrainingCollects data for Meta’s AI models
Applebot-ExtendedAppleTrainingOpt-in token for Apple Intelligence training

AI crawler volume has grown sharply, with GPTBot traffic alone rising several times over across 2025, so these lines now make up a meaningful share of many sites’ bot activity. Before you trust any of them, though, you need to confirm they are real.

Log analysis matters for generative engine optimization because crawl access is the precondition for citation: an answer engine cannot quote a page it never fetched. GEO is the practice of structuring content and site access so your pages surface in AI-generated answers, and the first diagnostic question is simply whether the AI crawlers are reaching your content at all.

Logs answer questions that AI-visibility tools cannot. They show which of your pages GPTBot and PerplexityBot actually request, how deep into your site they go, and whether they receive a clean 200 or a block. If a section you want cited never appears in the logs, no amount of on-page optimization will help until the access problem is fixed.

A common failure mode is accidental blocking. Many sites disallow AI crawlers in robots.txt without realising it, or serve important content only after client-side JavaScript that bots never execute. Logs expose both: the first as an absence of AI user-agents, the second as bots requesting an HTML shell but none of the API calls that populate it.

There is also a strategic read. When user-triggered fetchers like ChatGPT-User and Perplexity-User appear against specific URLs, those pages are being surfaced in live answers right now. That is a direct signal of which content earns AI visibility, and it points to the topics and formats worth expanding. With that in mind, here is how to actually run an analysis.

How to analyse your log files

You analyse log files in four stages: get the logs, filter them to crawler traffic, verify the crawlers are genuine, then interpret the patterns. The mechanics vary by stack, but the sequence stays the same.

1. Access your log files

First, locate and export the raw logs. Where they live depends on your hosting:

  • Managed hosting or cPanel: look for “Raw Access Logs” or “Visitor Statistics” in the control panel.
  • Apache servers: logs typically sit in /var/log/apache2/ or /var/log/httpd/.
  • Nginx servers: usually /var/log/nginx/access.log.
  • CDN or edge (Cloudflare, Fastly, and similar): pull logs from the provider, since the CDN, not your origin, sees the real client requests.

Aim for at least two to four weeks of data so crawl patterns have time to emerge. A single day rarely shows enough to distinguish a trend from noise.

2. Filter to crawler activity

Raw logs mix human visitors, bots, and asset requests together. Isolate the crawler traffic by filtering on the user-agent field for the tokens you care about: Googlebot and Bingbot for classic search, plus the AI tokens listed above. From there, segment the filtered data by URL, status code, crawler, and date. This is where a spreadsheet stops being enough and a dedicated log tool or script earns its place, especially past a few hundred thousand lines.

3. Verify the crawlers are genuine

This step is non-negotiable, because user agents are trivial to fake. Research through 2025 found that a meaningful share of traffic claiming to be well-known AI crawlers is spoofed, with some impersonating ChatGPT’s fetcher at rates above 16%. A bot that lies about being Googlebot or GPTBot can scrape aggressively, skew your analysis, or probe for weaknesses.

The reliable verification method is forward-confirmed reverse DNS (FCrDNS):

  1. Take the client IP from the log line.
  2. Run a reverse DNS lookup to get its hostname.
  3. Confirm the hostname belongs to the claimed operator’s domain (for example googlebot.com or an OpenAI-owned domain).
  4. Run a forward DNS lookup on that hostname and confirm it resolves back to the original IP.

For operators that publish IP ranges, such as Google, OpenAI, Perplexity and Anthropic, you can also match the client IP against their official published range files. If the IP does not fall inside the operator’s ranges or fails FCrDNS, treat the user agent as spoofed regardless of what it claims.

4. Interpret the patterns

With clean, verified data, look for the signals that drive action:

  • Status code distribution per crawler. A healthy profile is mostly 200s. Spikes in 3xx, 4xx, or 5xx point to redirects, broken URLs, or server strain.
  • Crawl distribution by URL group. Compare requests to money pages versus low-value URLs. Heavy crawling of parameter or faceted URLs is wasted budget.
  • Recrawl frequency. How many days pass between crawls of your key templates.
  • AI crawler coverage. Which sections GPTBot, ClaudeBot and PerplexityBot reach, and which they never touch.
  • Trends over time. Rising errors or falling crawl frequency on important pages are early warnings worth investigating.

The reference point for status codes is worth keeping close, because each class means something specific to a crawler.

Status classMeaning to a crawlerSEO / GEO implication
200Request succeededContent was served and can be indexed or cited
301 / 302RedirectWastes budget in chains; 302 for a permanent move loses signal
304Not modified since last crawlEfficient; crawler reuses its cached copy
403ForbiddenCrawler is blocked; often an accidental firewall or bot rule
404 / 410Not found / goneBroken links; clusters signal structural problems
429Too many requestsYour server is rate-limiting the crawler, throttling coverage
500 / 503Server error / unavailableCrawlers back off; sustained 5xx erodes crawl budget and trust

Once you can read these patterns, the fixes tend to suggest themselves.

Turning findings into fixes

Log analysis is only useful if it changes what you do next, and the most common fixes fall into a short list. Start with whatever wastes the most crawl budget or blocks the most valuable content.

  • Contain crawl waste. Block low-value parameter and faceted URLs in robots.txt, apply noindex where appropriate, and use canonical tags to consolidate duplicates so crawlers stop chasing permutations.
  • Fix error clusters. Repair or redirect the URLs producing 404s, and investigate any recurring 5xx responses, which often point to performance limits under crawler load.
  • Collapse redirect chains. Point redirects directly at their final destination so a single hop replaces a chain of three or four.
  • Correct accidental blocks. If AI or search crawlers are missing from your logs entirely, audit robots.txt and firewall rules; you may be excluding the very bots you want.
  • Strengthen internal linking to under-crawled pages. Pages that rarely appear in logs usually lack internal links pointing to them.

After each change, keep watching the logs. The confirmation that a fix worked, that crawl budget shifted toward priority pages, or that GPTBot now reaches a section it used to miss, shows up in the log data within days.

Doing this continuously instead of manually

Traditional log file analysis is a periodic, manual exercise: download the raw logs, clean them, filter for bots, verify IPs, and build the report by hand. It works, but it is slow, it captures a fixed window rather than a live view, and the verification step is tedious to repeat.

This is the gap Lume is built to close. Lume captures the same server-side view of crawler and agent traffic at the edge, continuously, and delivers it already classified by bot and already verified, so spoofed requests are flagged rather than silently counted. Instead of parsing user-agent strings and running reverse DNS lookups yourself, you see which genuine crawlers and AI agents hit which pages, without the manual log wrangling.

Whether you analyse logs by hand or use a continuous tool, the underlying discipline is the same: the server-side record is the honest account of who crawls your site, and it is the one dataset that covers both classic search and AI search at once.

Frequently asked questions

What is the difference between log file analysis and a crawl tool like a site auditor?

A crawl tool simulates how a bot might move through your site by following links itself, producing a hypothetical map. Log file analysis records what real crawlers actually did. The two are complementary: a crawler shows you what is technically reachable, while logs show you what search engines and AI bots genuinely chose to request and how often.

Can I see AI crawlers like GPTBot in Google Search Console?

No. Search Console reports only Google’s own crawl activity, and GA4 and similar JavaScript analytics never see bots at all because crawlers do not execute JavaScript. Server logs, or a tool that reads server-side traffic, are the only way to observe GPTBot, ClaudeBot, PerplexityBot and other AI crawlers on your site.

How much log data do I need to draw conclusions?

For most sites, two to four weeks is a sensible minimum. That window is long enough to reveal recrawl frequency and to separate genuine patterns from day-to-day noise. Very large sites generate meaningful data faster; small sites may need longer to accumulate enough crawler visits to see trends.

How do I know if an AI crawler in my logs is genuine and not spoofed?

Do not trust the user-agent string alone, since it is easy to fake. Verify the client IP using forward-confirmed reverse DNS, or match it against the operator’s published IP ranges. A request claiming to be GPTBot from an IP outside OpenAI’s ranges is spoofed and should be treated as such.

Should I block AI crawlers in robots.txt?

It depends on your goal, and the crawler type matters. Blocking training crawlers like GPTBot and CCBot keeps your content out of model training but does not affect live AI answers. Blocking search-index and user-fetch crawlers like OAI-SearchBot, PerplexityBot and their user-triggered fetchers removes you from AI search results and citations, which usually works against visibility. Read your logs first to see which bots reach which pages, then decide per crawler.

More posts to read

See the non-human half of your traffic.

Lume shows you every crawler, scraper and AI agent on your site, and verifies which ones are real. Set up in minutes.

Start for free →