Log File Analysis

How to read your server's raw access logs to see exactly what Googlebot, Bingbot, and AI crawlers actually fetched — verifying real bots, finding crawl waste and orphans, and why logs are the ground truth that crawl tools and Search Console only approximate.

First published: Jun 22, 2026 · Last updated: Jul 30, 2026 · Advanced
demand #10 in Crawling#27 in How Search Works#145 in Technical SEO#189 on the site
1 evidence signal on this page

Log file analysis is reading your server's raw access logs — the unsampled, ground-truth record of every request the server got — to see exactly which URLs Googlebot, Bingbot, and AI crawlers actually fetched, how often, and with what status code. The non-negotiable first step is verifying the bots are real (reverse + forward DNS, or Google's published IP ranges), because user agents are spoofed all the time. Then you look for crawl waste, most/least-crawled URLs, status codes by frequency, orphan pages, and the mobile-vs-desktop split. Logs complement GSC Crawl Stats; they don't replace it. Most small sites don't need this — it's a large-site, ecommerce, and migration tool.

TL;DR — Logs are the unsampled ground truth for crawling: every request, every bot, every status code. The non-negotiable first step is verifying Googlebot/Bingbot via reverse + forward DNS (or Google’s published IP-range JSON) — user agents are spoofed constantly, and you do all crawl math on the verified set only. Then read the logs for most/least-crawled URLs and sections, crawl frequency over time, status codes prioritized by frequency, crawl waste (params, facets, internal search, infinite pagination), orphan and uncrawled pages (cross-referenced against a crawl), and the mobile-vs-desktop Googlebot split. Bing publishes no official IP ranges, so DNS to *.search.msn.com is the method there. Logs complement GSC Crawl Stats — they don’t replace it. And in 2026, AI bots are now a huge share of what shows up.

Evidence for this claim Web-server access logs record HTTP requests and commonly include request, response-status, user-agent, and timing fields depending on configuration. Scope: Apache HTTP Server access-log behavior; other servers vary by configuration. Confidence: high · Verified: Apache HTTP Server: Log Files Evidence for this claim User-agent text alone does not authenticate Googlebot; Google recommends DNS verification or matching published IP ranges. Scope: Google crawler verification, applicable when classifying log traffic. Confidence: high · Verified: Google Search Central: Verify Googlebot

Why logs are the ground truth

There are three ways to “see” how search engines crawl you, and they are not equal:

  • A crawl tool (Screaming Frog SEO Spider, Ahrefs Site Audit) simulates a crawl. It tells you what a bot could find, not what Google did fetch.
  • GSC Crawl Stats summarizes the real thing, but it’s sampled, aggregated, and capped (roughly 1,000 rows, ~90 days, no per-URL export).
  • Server logs record the real thing — every request, for every bot, with the exact URL, timestamp, and status code.

The Ahrefs log-file guide I reviewed puts it plainly: server logs are “the most trustworthy source of information to understand the URLs that search engines have crawled.” That’s the whole reason this technique exists. When I want to know what Googlebot actually did — not what it might do, not a rounded summary — I go to the logs.

A typical log line carries the IP address, user agent, URL path, timestamp, request method (GET/POST), and HTTP status code. Everything below is just slicing those fields intelligently.

When you actually need it (and when you don’t)

Be honest with yourself here. Log file analysis is a large-site tool. It earns its keep on sites with tens of thousands of URLs, ecommerce and faceted navigation, sites mid-migration, and sites stuck in Discovered – currently not indexed. As I wrote in my crawl budget guide, “Most sites don’t need to worry about crawl budget, but there are few cases where you may want to take a look.” Daniel Waisberg of Google has made a similar point about Crawl Stats — per Search Engine Journal’s coverage, the report isn’t much of a concern for sites under ~1,000 pages.

If your few-hundred-page site is being crawled fine, skip this and go fix something with more leverage.

How to get your logs (the hardest part is access)

Logs live wherever the request actually terminated:

  • Apache & Nginx → the Apache “combined” log format (the most common).
  • Microsoft IIS → W3C format.
  • AWS ELB/ALB → ELB format.
  • CDNs (Cloudflare, Fastly, Akamai) → their own log exports. This matters: at a CDN-fronted site, an origin-only log misses edge-cached hits, so pull logs at the layer the bot actually reached.

Aim for 30 days minimum, 90 ideal, to capture crawl-frequency variation. And plan for friction — getting access to server logs is often the genuinely hard part (DevOps gatekeeping). Even Googlers, in a migration episode of Search Off the Record, flagged how hard log files can be to obtain in practice. Budget time for the request.

Logs aren’t just bot traffic — they capture every request, including real visitors, and can carry query-string values, session identifiers, or other sensitive data alongside the URL path. OWASP’s logging guidance is blunt about this: authentication credentials, access tokens, and personally identifiable information generally shouldn’t land directly in a log; they should be removed, masked, or hashed first. Build that into your access controls and export process before you hand a log file to anyone for analysis, not after.

Step 1 — Verify the bots are real (do this before anything else)

This is the step most guides wave at in one line. Do not. Many bots pretend to be Googlebot to get past firewalls (Ahrefs). The user agent is unauthenticated text; treat every “Googlebot” line as a claim to be proven.

Googlebot — two valid methods:

  1. Reverse + forward DNS (the bidirectional check). Google’s own steps: run a reverse DNS lookup on the IP from your logs with the host command; verify the domain is googlebot.com, google.com, or googleusercontent.com; then run a forward DNS lookup on that hostname and verify it resolves back to the original IP. The forward step is what makes this trustworthy — a spoofer can point reverse DNS at a *.googlebot.com name, but only the round-trip back to the same IP proves it. (Commands for macOS/Linux and Windows are in the Scripts tab.)
  2. Match against Google’s published IP ranges. Google publishes JSON files of its crawler IPs in CIDR format — common-crawlers.json for Googlebot and friends, plus special-crawlers.json, the user-triggered-fetcher files, and an all-Google goog.json. As I noted in my Googlebot guide, Google “provided a list of public IPs you can use to verify the requests are from Google… You can compare this to the data in your server logs.”

Bingbot — DNS only. This is the key contrast: Bing does not officially publish IP ranges. Bing’s own wording is that “…like other search engines, Bing does not publish a list of IP addresses or ranges from which we crawl the Internet,” because “the IP addresses or ranges we use can change any time.” So for Bingbot you do reverse + forward DNS to a hostname ending in *.search.msn.com (e.g. msnbot-157-55-33-18.search.msn.com), or use the Verify Bingbot tool. (Microsoft has since released a bingbot IP JSON, but its official verification guidance still centers on DNS precisely because IPs change.)

Then throw out the fakes. Do all of your crawl math on the verified set only. Unverified “Googlebot” is almost always a scraper or a spoofed bot and belongs in a security review, not your crawl-waste analysis.

Step 2 — What to look for

Once you’re working with verified hits, here’s the read:

  • Most & least crawled URLs and sections. Rank requests by URL and by directory. This is where your crawl budget is actually going — and it’s usually surprising.
  • Crawl frequency over time. Trend crawls by URL/section to catch drops (a migration broke something) or spikes (a new section, or a spider trap spinning up infinite URLs).
  • Status codes bots hit, prioritized by frequency. Quantify 200 vs. 301/302 (and chains), 404, and 5xx. A 404 hit 5,000×/week is a different problem than a 404 hit once — fix by crawl frequency, not by mere existence.
  • Crawl waste. Faceted nav, URL parameters, internal search results, and infinite calendars/pagination can eat a large share of crawl budget on bad offenders. Logs show exactly which junk patterns the bots are burning time on.
  • Orphan & uncrawled pages. This needs both datasets. Cross-reference logs against a site crawl: URLs in the logs but not in the crawl = orphans, old redirects, or externally-linked pages; URLs in the crawl but not in the logs = pages Google has never fetched.
  • Mobile vs. desktop Googlebot. Split by user agent. Post mobile-first, it should be majority Googlebot Smartphone — a desktop-heavy split is worth a look.
  • Response time & crawl health. Rising average response time correlates with reduced crawling. Per SEJ’s write-up of Waisberg’s guidance: “Watch out for a consistent increase in average response time. Google says it might not affect crawl rate immediately, but it’s a good indicator that your servers might not be handling all the load.”

What logs do NOT tell you

Keep these straight or you’ll over-read the data:

  • Crawl ≠ index. A URL Googlebot fetches daily can stay unindexed indefinitely. Logs prove fetching, not index status — pair them with GSC’s Page Indexing / URL Inspection to learn the index side.
  • Crawl ≠ rank, and more crawling doesn’t help. As I’ve said repeatedly, “The rate of crawling isn’t going to impact your rankings.” Don’t chase crawl volume as if it were a ranking lever.
  • noindex doesn’t reduce crawling. noindex controls indexation, not crawling — to actually stop the crawl you use robots.txt or a status code.
  • Crawl ≠ model training or citation. A verified hit from GPTBot, ClaudeBot, or PerplexityBot proves that request happened — a fetch at that layer. It doesn’t prove the page was used to train a model, retained anywhere downstream, or cited in a chat answer. Those are separate, unobserved outcomes; don’t stretch a verified log line further than it goes.

The 2026 wrinkle: AI bots are all over your logs now

The cast of characters in a modern log file has changed. In my analysis of Cloudflare Radar data (Meet the New Web Crawlers), search-engine bots still crawl the most — but AI bots are firmly in second place and on track to overtake them within a couple of years. GPTBot, ClaudeBot, PerplexityBot, and friends now show up heavily. When you segment your verified hits by user agent, don’t be surprised to find AI crawlers rivaling the search engines for share of requests. (Screaming Frog’s Log File Analyser has added a dedicated AI-bot tutorial for exactly this.)

How this fits with the rest of crawling

Logs are the diagnostic layer under the whole crawling cluster. They’re how you actually measure the crawl budget spend that engines describe in the abstract (Gary Illyes defines it as “the number of URLs Googlebot can and is willing or is instructed to crawl”). They’re also how you catch spider traps red-handed — an infinite URL space from a calendar or facet shows up as a flood of near-identical requests — and how you confirm whether your crawl frequency work (accurate lastmod, internal links to important pages) actually changed bot behavior. And remember they complement, not replace, GSC Crawl Stats: Crawl Stats is the sampled on-ramp; logs are the unsampled, multi-bot, per-URL detail.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin an expert quote first.