読み物Technical SEO

Level: Pro

Advanced Crawling, Server Logs, and Crawl Optimization

Use access logs to see exactly how crawlers treat your site: verify real Googlebot, find wasted crawling, and learn when crawl budget matters and when it doesn't.

Edeeson Opina11 min read

A Pro lesson card: lesson 11 of the SEO series, Advanced Crawling, Server Logs, and Crawl Optimization, with the Miso fox holding a camera.

What you’ll learn

  • Parse access logs and segment crawler requests by pattern and status
  • Verify genuine search engine crawlers with DNS or published IP ranges
  • Explain crawl capacity and crawl demand
  • Decide when crawl-budget optimization matters, and when it doesn't
  • Prioritize crawl optimizations safely
On this page
  1. What an access log contains
  2. Identifying verified search engine crawlers
  3. Turning logs into crawl data
  4. Bot request patterns to look for
  5. Crawl frequency
  6. Crawl budget concepts
  7. Where crawl-budget optimization matters, and where it doesn't
  8. Response-code analysis
  9. Duplicate URL patterns
  10. Server performance considerations
  11. Crawl optimization strategies
  12. A worked example
  13. Common mistakes and troubleshooting
  14. Key takeaways
  15. Exercise
  16. References
  17. What's next

Every other SEO data source is a summary: Search Console samples, crawlers simulate, analytics only sees browsers that run JavaScript. Server access logs are different. They record every request that reached your server, including every request from search engine crawlers, with the exact URL, status code, and time. For large or complex sites, log analysis is how you stop guessing about crawling and start measuring it.

This lesson shows how to read logs, verify real crawlers, find patterns that waste crawl effort, and decide when crawl optimization is worth your time. That last question matters, because for most sites, it isn't.

What an access log contains

Most web servers write one line per request. The widely used combined log format (the default in nginx and common in Apache) looks like this:

access.logLog
66.249.66.12 - - [27/Oct/2026:03:14:07 +0000] "GET /products/trail-runner/ HTTP/1.1" 200 18342 "-" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

The fields, in order: client IP, identity (unused), user (unused), timestamp, request line (method, path with query string, protocol), status code, response size in bytes, referrer, and user agent.

Two additions make SEO analysis much easier, and you can add them to the log format:

  • Response time, such as nginx's $request_time, to see how fast you served crawlers.
  • Host, if one server handles several hostnames or subdomains.
nginx.confnginx
log_format seo '$remote_addr - - [$time_local] "$request" $status $body_bytes_sent '
               '"$http_referer" "$http_user_agent" $request_time "$host"';
access_log /var/log/nginx/access.log seo;

If a CDN sits in front of your server, the origin logs only see cache misses, and the client IP may be the CDN's. Use the CDN's own logs, or make sure the real client IP is forwarded and logged.

Logs contain IP addresses, which can be personal data. Keep retention short, restrict access, and anonymize or aggregate before sharing. The examples in this lesson use addresses from documentation ranges, except where a real crawler range is needed to explain verification.

Identifying verified search engine crawlers

Anyone can put "Googlebot" in a user agent string. Scrapers do it routinely to get past rules meant for real bots. Before counting a request as Googlebot, verify it.

Google documents two methods:

  1. Reverse and forward DNS. Look up the hostname for the IP, check that it ends in googlebot.com, google.com, or googleusercontent.com, then look up that hostname and confirm it resolves back to the same IP.
  2. Published IP ranges. Google publishes JSON files listing the IP ranges of its crawlers and fetchers; match the IP against them. This is faster for bulk processing.
Shell
$ host 66.249.66.12
12.66.249.66.in-addr.arpa domain name pointer crawl-66-249-66-12.googlebot.com.

$ host crawl-66-249-66-12.googlebot.com
crawl-66-249-66-12.googlebot.com has address 66.249.66.12

Both directions match, so this is genuine Googlebot. Bing documents a similar process for Bingbot (hostnames ending in search.msn.com). A request claiming to be Googlebot from an IP that fails verification should be counted as an ordinary bot, not as Google.

Google also uses other crawlers and fetchers with their own user agents (for images, ads, and user-triggered fetches such as tools a person runs). Group them separately so you know which crawling feeds search indexing.

Turning logs into crawl data

You don't need special software to start. For a quick look, standard command-line tools go a long way. This pipeline counts Googlebot requests by status code (by user agent only, so verify IPs separately before trusting it):

Shell
grep 'Googlebot' access.log | awk '{print $9}' | sort | uniq -c | sort -rn
Text
  48211 200
   6904 301
   3127 404
    212 500
     88 304

And the most-crawled paths, with query strings stripped to see patterns:

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

For anything beyond a quick look, load the logs into a database or a notebook, verify crawler IPs in bulk against the published ranges, and join the data with your crawl export and sitemap list. A small Python sketch for parsing the combined format:

parse_logs.pyPython
import re
from collections import Counter

LINE = re.compile(
    r'(?P<ip>\S+) \S+ \S+ \[(?P<time>[^\]]+)\] "(?P<method>\S+) (?P<path>\S+) \S+" '
    r'(?P<status>\d{3}) (?P<size>\S+) "(?P<referrer>[^"]*)" "(?P<agent>[^"]*)"'
)

def googlebot_requests(lines, verified_ips):
    for line in lines:
        match = LINE.match(line)
        if match and "Googlebot" in match["agent"] and match["ip"] in verified_ips:
            yield match

def status_by_section(requests):
    counts = Counter()
    for request in requests:
        section = "/" + request["path"].lstrip("/").split("/", 1)[0].split("?", 1)[0]
        counts[(section, request["status"])] += 1
    return counts

Bot request patterns to look for

Group requests by URL pattern (section, template, or parameter) rather than by individual URL. Patterns tell the story:

  • Share of crawling by section. Is Googlebot spending most of its requests where your valuable pages are?
  • Parameter explosions. Thousands of requests to ?sort=, ?sessionid=, or filter combinations usually mean crawl effort is going to near-duplicates.
  • Redirect and error share. A high proportion of 301 and 404 responses means crawlers keep following old or broken links. Find where those links come from.
  • Uncrawled important pages. Join log data with your sitemap: important URLs with no Googlebot request in 30 or 60 days are discovery or priority problems.
  • Crawled but unwanted pages. URLs crawled heavily that you don't want indexed: internal search, calendars, printer versions.

Crawl frequency

Crawl frequency varies widely by page. Homepages and frequently updated sections are often requested daily; stable deep pages may be crawled every few weeks or months. That's normal. What to watch:

  • New pages: how long until the first Googlebot request after publishing? Long gaps suggest weak internal linking or sitemaps that aren't being read.
  • Updated pages: do requests increase after you change content and <lastmod>?
  • Sudden drops across the site: often linked to server slowness, errors, or robots.txt changes.

Crawl budget concepts

Google describes crawl budget as the combination of two things:

  • Crawl capacity limit: how many simultaneous connections and requests Googlebot can use without overloading your server. It goes up when your server responds quickly and reliably, and down when it slows or returns errors.
  • Crawl demand: how much Google wants to crawl, based on how popular URLs are, how often they change, and how many URLs it knows about.

Together they decide how many URLs Google crawls and how often. You influence capacity with server health, and demand with the quality and freshness of your pages and with what you link to.

Where crawl-budget optimization matters, and where it doesn't

Google's documentation is direct: crawl budget is mainly a concern for

  • very large sites (on the order of a million or more unique pages) with content that changes moderately often,
  • medium or large sites (tens of thousands of pages or more) with content that changes very rapidly, such as daily,
  • and sites with a large share of URLs in "Discovered – currently not indexed."

If your site has a few thousand pages and new pages are usually crawled within days, crawl budget isn't your problem. Spending time on it would be optimizing the wrong thing. Indexing issues on smaller sites are much more often about quality, duplication, or linking. Logs are still useful on small sites for debugging errors and verifying crawler behavior, but you don't need a crawl-budget project.

Response-code analysis

From logs, compute for verified Googlebot over a period (say, 30 days):

  • Share of 200: ideally the large majority.
  • Share of 3xx: high values mean internal links, sitemaps, or external links point at old URLs. Update internal links to final URLs.
  • Share of 404 and 410: some is normal (old URLs Google remembers). Look for 404s with internal referrers or many requests.
  • Share of 5xx and 429: should be near zero. Spikes slow crawling for the whole host.
  • Response time: crawlers back off when the server is slow. Compare crawler response times with your normal traffic.
crawl-summary.txtText
Googlebot (verified), 30 days     requests   share
200 OK                              48,211   82.3%
301 Moved Permanently                6,904   11.8%
404 Not Found                        3,127    5.3%
500 Internal Server Error              212    0.4%
304 Not Modified                        88    0.2%
Median response time: 180 ms   p95: 1.9 s (product pages)

In this anonymized example, nearly 12% of crawling goes to redirects, and the 95th percentile response time for product pages is high. Both are worth investigating before anything else.

Duplicate URL patterns

Logs reveal duplicate patterns that crawls of your own links might miss, because they show URLs search engines learned from anywhere: old sitemaps, external links, or parameters added by other systems. Common findings:

  • the same path crawled with and without a trailing slash, or with mixed case;
  • tracking parameters (utm_*, gclid, fbclid) appended to internal links;
  • session ids or cache-busting parameters on HTML pages;
  • calendar or pagination URLs extending far beyond real content (/events/2031/05/).

For each pattern: stop generating the URLs (fix links and templates), consolidate what exists (redirects or canonicals, lesson 7), and only then consider blocking crawling of patterns that have no value at all.

Server performance considerations

Because capacity depends on server health, performance work is crawl work:

  • Cache HTML where possible, and serve static assets from a CDN.
  • Support conditional requests (ETag, Last-Modified, 304 Not Modified) so unchanged pages cost less to recrawl.
  • Make expensive pages (large listings, faceted results) fast or cacheable.
  • For planned maintenance, return 503 with a Retry-After header, briefly. Don't leave it for days: persistent errors cause URLs to drop.
  • If Googlebot is genuinely overloading your server, returning 503 or 429 temporarily slows it. Google doesn't support the crawl-delay robots.txt rule, and its old crawl-rate setting in Search Console has been retired.

Crawl optimization strategies

In rough order of impact and safety:

  1. Fix server errors and slowness. This raises crawl capacity for everything.
  2. Stop linking to URLs that redirect or error. Update internal links and sitemaps to final, canonical URLs.
  3. Stop generating infinite or near-duplicate URL spaces. Constrain filters, remove session ids from URLs, cap calendars.
  4. Strengthen links to important pages so they're discovered and re-crawled sooner.
  5. Keep sitemaps clean and <lastmod> accurate, so search engines can trust them for discovery and freshness.
  6. Block crawling of URL patterns with no search value in robots.txt, such as internal search results or endless sort combinations, once you've confirmed they shouldn't be indexed. Remember blocked URLs can't pass signals or show noindex.
  7. Remove or consolidate low-value pages so crawl demand concentrates on pages that matter.

Then measure again in the logs: did the share of crawling on valuable sections go up, and did new pages get crawled sooner?

A worked example

An online marketplace with about 2 million product URLs reports that new listings take weeks to appear in search. A 30-day log analysis of verified Googlebot shows:

  • 38% of requests go to /search? URLs with dozens of parameter combinations;
  • 9% go to listing URLs that redirect to a canonical version with a trailing slash;
  • new product pages receive their first Googlebot request a median of 19 days after publishing;
  • server response time for search URLs averages 2.4 seconds.

Actions: disallow /search in robots.txt (those pages were already noindex and had been for months, so the signals were already understood); fix internal links to use the trailing-slash canonical form; add newly published listings to a dedicated "new products" sitemap with accurate <lastmod> and link them from category pages; cache category pages.

Six weeks later, the logs show search URLs falling to under 5% of requests, redirects to 2%, and the median time to first crawl of new products falling to 4 days. Search Console's "Discovered – currently not indexed" count drops accordingly. (These figures are illustrative. Your results will depend on your site, and correlation in timing doesn't prove which change mattered most; see lesson 15.)

Common mistakes and troubleshooting

  • Trusting user agent strings. Always verify crawler IPs.
  • Analyzing a sample that misses CDN-served requests. Make sure you have logs from the layer crawlers actually hit.
  • Blocking before consolidating. Blocking duplicate URLs in robots.txt hides their canonical and redirect signals.
  • Optimizing crawl budget on a small site. Spend that time on content and linking instead.
  • Keeping logs forever. Treat them as sensitive data with a retention limit.

Key takeaways

  • Access logs are the only complete record of crawler behavior; group them by URL pattern, status, and time.
  • Verify crawlers with reverse-forward DNS or published IP ranges before counting them.
  • Crawl budget is real but matters mainly for very large or fast-changing sites.
  • The safest crawl optimizations are server health, clean links and sitemaps, and not generating useless URLs.

Exercise

Using 7 to 30 days of logs from a site you manage (or the anonymized sample format above):

  • Filter to verified Googlebot requests.
  • Produce three tables: requests by status code, by top-level section, and by query parameter name.
  • Find the ten most-crawled URL patterns that you don't want indexed, and the ten important URLs with the fewest crawls.
  • Write a short plan: which two changes would most improve crawl focus, and how you'll measure the result in the logs.

Practice with RankMiso. Clean sitemaps are one of the safer crawl optimizations. The Sitemaps section in RankMiso (our free extension) reads a site's sitemap files after you allow the site in Chrome, or an XML file you import, and reports invalid XML, missing or relative loc entries, duplicate URLs, and lastmod values that aren't dates. Free on the Chrome Web Store (opens in a new tab) and Firefox Add-ons (opens in a new tab).

References

What's next

One of the biggest sources of wasted crawling on large sites is faceted navigation: filters that multiply into millions of URLs. Enterprise SEO and Faceted Navigation shows how to decide which combinations deserve to be indexed and how to keep the rest from swallowing your crawl.

See every lesson in SEO: From Fundamentals to Advanced Optimization