Check 03.14 · Crawling

Analyze server logs

Set up your access logs, then analyze verified Googlebot and Bingbot visits: pages crawled, HTTP codes, waste, crawl frequency and response time.

Priority
Critical
Difficulty
Advanced
Estimated time
2 h to 1 day, then 1 h a month
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

Access logs record every request received by the server or the CDN (Content Delivery Network): IP address, date, URL, HTTP code, user agent and, if you add it, response time. Analyzing them from an SEO angle means measuring what Googlebot and Bingbot actually do: which pages they crawl, how often, what they receive, and where they waste their time. Once this check is done, the logs contain the right fields, you know how to isolate genuine crawlers, and a monthly report compares the pages crawled with the pages that matter.

Why it matters

Search Console provides aggregated crawl stats and sample URLs, for Google only. Logs provide the complete list, for every crawler, and answer questions no console addresses:

  • Are strategic pages crawled? A product page that no crawler has requested in thirty days is unlikely to be up to date in the index.
  • Where do requests go? If half of Googlebot's visits target parameterized URLs, filters or deleted pages, that is just as much less for useful pages.
  • What do crawlers receive? A crawler can receive 5xx errors, 429s or slow responses that your manual tests do not reproduce, because a firewall or a rate limit treats it differently.
  • How long for a new page? The gap between publication and Googlebot's first visit measures how effective your internal linking and sitemaps are.
  • Which unknown URLs do they crawl? URLs requested by crawlers but absent from the site and the sitemap reveal old addresses, broken external links or crawler traps.

Logs measure access, not indexing or rankings. Read them alongside the indexing reports, not instead of them. The same work applied to AI assistant crawlers is described in analyze AI crawler logs (opens in a new tab).

What it improves

  • Crawling You spot and eliminate waste (parameters, redirects, errors). A noticeable effect, mostly on sites with tens of thousands of URLs.
  • Indexing of useful pages Pages that are never crawled are identified and can be better linked. Indirect effect.
  • Stability Errors and slowness served to crawlers become visible.
  • Migrations You follow, day by day, the discovery of new URLs and the abandonment of old ones.
  • Rankings No direct effect.

How to check

Three questions, in order.

1. Do you have the logs, and from which layer? Behind a CDN, pages served from the cache never reach the server: its logs underestimate crawler visits. Log locations for each environment are detailed in the AI crawler logs (opens in a new tab) guide; the sections below specify the fields to add.

2. Are the useful fields recorded? Display one line:

tail -n 1 /var/log/nginx/access.log

At a minimum you need the IP, the date, the request, the status code and the user agent. For a full analysis, add the requested host and the response time. Compliant result with the format recommended below:

66.249.66.1 - - [24/Nov/2026:10:15:32 +0100] "GET /guides/choisir-chaudiere/ HTTP/1.1" 200 48213 "-" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" 0.182 "www.example.com"

3. How much history? Thirty days at a minimum, ideally three months, to see pages that are crawled rarely.

How to implement

Before you start

  • Read the furthest upstream layer. CDN logs when they exist, otherwise the server's. Behind a proxy or a CDN, restore the real client address (mod_remoteip on Apache, real_ip_header on Nginx), otherwise every request appears to come from the proxy.
  • Do not trust the user agent. Any script can claim to be Googlebot. Filter on addresses verified by reverse DNS (see below and verify crawler identity against official IP ranges if possible (opens in a new tab)).
  • Handle personal data properly. An IP address is personal data: set a retention period, restrict access to the files and document it.
  • Prepare the list of URLs that matter: an export of the sitemap or of a crawl, with the page type. This is the reference you will compare crawler visits against.

Fields to record:

Field Purpose Nginx Apache IIS
Client IP Verify the crawler $remote_addr %h c-ip
Date and time Frequency, delays $time_local %t date, time
Method, URL, protocol Pages crawled $request %r cs-method, cs-uri-stem, cs-uri-query
HTTP code Errors, redirects $status %>s sc-status
Bytes sent Response size $body_bytes_sent %O sc-bytes
User agent Identify the crawler $http_user_agent %{User-Agent}i cs(User-Agent)
Response time Slowness served to crawlers $request_time (seconds) %{ms}T (milliseconds) time-taken (milliseconds)
Requested host Subdomains, variants $host %{Host}i cs-host

Apache

Versions Apache 2.4.13 and later (the %{ms}T format does not exist before that).

Add a format in the global configuration, then use it in the virtual host:

LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %{ms}T \"%{Host}i\"" seo
CustomLog ${APACHE_LOG_DIR}/example-access.log seo

%{ms}T (time in milliseconds) has existed since Apache 2.4.13. The analysis commands below assume seconds: with this format, replace t[1] with t[1] / 1000. Increase the history in /etc/logrotate.d/apache2 (the rotate value). Reload with sudo apachectl configtest && sudo systemctl reload apache2.

Nginx

Versions Nginx 1.18 and later, up to the current 1.30 (stable) and 1.31 (mainline) branches.

In the http context of /etc/nginx/nginx.conf:

log_format seo '$remote_addr - $remote_user [$time_local] "$request" '
               '$status $body_bytes_sent "$http_referer" "$http_user_agent" '
               '$request_time "$host"';

Then in the server block:

access_log /var/log/nginx/example-access.log seo;

Do not turn off logging for static files if you want to measure the crawling of CSS, JavaScript and images: an access_log off; in a location block makes them disappear. Reload with sudo nginx -t && sudo systemctl reload nginx. Rotation: /etc/logrotate.d/nginx.

IIS

Versions IIS 8.5 and 10 (Windows Server 2012 R2 to 2025).

In IIS Manager, open the site, then Logging > Select Fields, and check in particular “User Agent”, “Host” (cs-host) and “Time Taken” (time-taken). The W3C files are in %SystemDrive%\inetpub\logs\LogFiles\W3SVC<identifiant>\. Counting Googlebot requests by status code in PowerShell:

Get-Content "C:\inetpub\logs\LogFiles\W3SVC1\*.log" |
    Where-Object { $_ -match "Googlebot" } |
    ForEach-Object { ($_ -split " ")[11] } |
    Group-Object | Sort-Object Count -Descending | Select-Object Count, Name

The [11] index depends on the fields enabled: find the position of sc-status in the #Fields: line at the top of the file.

Cloudflare

Versions Cloudflare dashboard and Logpush, all plans depending on available datasets, November 2026.

Pages served from the cache never reach the origin: for a site whose HTML is cached, Cloudflare's logs are the ones that count. Logpush exports HTTP requests to a storage destination (R2, S3, BigQuery…); the availability of this dataset depends on the plan. Useful fields: ClientIP, ClientRequestHost, ClientRequestURI, ClientRequestUserAgent, EdgeResponseStatus, CacheCacheStatus. Example on the exported files:

zcat -f *.log.gz | jq -r 'select(.ClientRequestUserAgent | test("Googlebot")) | [.EdgeResponseStatus, .ClientRequestURI] | @tsv' | sort | uniq -c | sort -rn | head -30

Without Logpush, Security > Analytics (direct link) lets you filter by user agent and see requests that were served, challenged or blocked. On the origin, restore the visitor's IP from the CF-Connecting-IP header.

AWS

Versions CloudFront console (legacy standard logging and v2), Amazon Athena and Application Load Balancer, November 2026.

CloudFront: in the distribution, on the Logging tab, choose Add > Amazon S3 (standard logging v2), with the W3C output format, the default fields and tab as the field delimiter; legacy standard logging, still available, produces the same format. Create the cloudfront_standard_logs Athena table with the statement from the AWS documentation, pointing LOCATION to the log prefix, then:

SELECT "date",
       sc_status,
       COUNT(*) AS requetes,
       ROUND(AVG(time_taken), 3) AS temps_moyen_s
FROM cloudfront_standard_logs
WHERE "date" >= current_date - interval '30' day
  AND cs_user_agent LIKE '%Googlebot%'
GROUP BY 1, 2
ORDER BY 1, 3 DESC;

For an Application Load Balancer, enable its access logs (load balancer attributes, S3 destination); they also contain the user agent.

Plesk

Versions Plesk Obsidian 18.0, Linux, Nginx as a proxy in front of Apache.

Read /var/www/vhosts/system/example.com/logs/proxy_access_ssl_log when Nginx sits in front of Apache: it sees every request. The default format is enough for every analysis except response time. Retention: Logs > Log Rotation.

cPanel

Versions cPanel & WHM 110 and later, up to version 138 (Jupiter theme).

Metrics > Raw Access downloads the logs per domain. Enable archiving to your home directory to keep the history; since version 132, the same page also lets you set the retention period. The format cannot be changed: no response time, but the rest is usable.

Shared hosting

Download the raw logs from the customer area every month, as the history is often short, and analyze them on your own computer. WordPress itself keeps no access log: plugins that record crawlers in the database do not see pages served by a cache.

Isolate genuine crawlers

Verify addresses claiming to be Googlebot with a reverse, then forward, DNS lookup, and keep a list of confirmed addresses:

LOG=/var/log/nginx/example-access.log

awk -F'"' '$6 ~ /Googlebot/ {split($1, p, " "); print p[1]}' "$LOG" | sort -u | while read -r ip; do
  name=$(host "$ip" | awk '/pointer/ {print $NF}')
  case "$name" in
    *.googlebot.com.|*.google.com.|*.googleusercontent.com.)
      host "$name" | grep -q "has address $ip$" && echo "$ip" ;;
  esac
done > ip-googlebot-verifiees.txt

awk 'NR==FNR {ok[$1]; next} ($1 in ok)' ip-googlebot-verifiees.txt "$LOG" > googlebot.log

For Bingbot, the reverse name ends in .search.msn.com. On large volumes, compare addresses with the ranges published in JSON by Google (common-crawlers.json) and by Bing (bingbot.json) instead, which is faster than one DNS lookup per address.

Command-line analysis

The following commands read the filtered googlebot.log file, in the recommended Nginx format (time in seconds). To include archives: zcat -f /var/log/nginx/example-access.log* | ….

LOG=googlebot.log

# Requests per day
awk -F'"' '{split($1, p, " "); print substr(p[4], 2, 11)}' "$LOG" | sort | uniq -c

# Breakdown of HTTP codes
awk -F'"' '{split($3, s, " "); print s[1]}' "$LOG" | sort | uniq -c | sort -rn

# Requests per section (first URL segment)
awk -F'"' '{split($2, r, " "); split(r[2], q, "?"); n = split(q[1], seg, "/"); print "/" seg[2] "/"}' "$LOG" | sort | uniq -c | sort -rn | head -20

# Share of requests on parameterized URLs
awk -F'"' '{split($2, r, " "); if (r[2] ~ /\?/) p++; t++} END {printf "%d requests, %d with parameters (%.1f%%)\n", t, p, 100 * p / t}' "$LOG"

# Most crawled parameters
awk -F'"' '{split($2, r, " "); if (split(r[2], q, "?") > 1) {n = split(q[2], kv, "&"); for (i = 1; i <= n; i++) {split(kv[i], k, "="); print k[1]}}}' "$LOG" | sort | uniq -c | sort -rn | head

# Smartphone or desktop
awk -F'"' '{if ($6 ~ /Mobile/) m++; else d++} END {print "smartphone:", m, "- desktop and others:", d}' "$LOG"

# Average response time for pages (excluding static files), in milliseconds
awk -F'"' '{split($2, r, " "); split($7, t, " "); if (r[2] !~ /\.(css|js|png|jpe?g|webp|avif|svg|gif|ico|woff2?)(\?|$)/) {s += t[1]; n++}} END {if (n) printf "%.0f ms on average across %d pages\n", 1000 * s / n, n}' "$LOG"

# Slowest pages served to the crawler (over one second)
awk -F'"' '{split($7, t, " "); split($2, r, " "); if (t[1] > 1) print t[1], r[2]}' "$LOG" | sort -rn | head -20

# Errors (codes 400 and above) with the URL
awk -F'"' '{split($3, s, " "); split($2, r, " "); if (s[1] >= 400) print s[1], r[2]}' "$LOG" | sort | uniq -c | sort -rn | head -30

# Last visit per URL
awk -F'"' '{split($2, r, " "); split($1, p, " "); last[r[2]] = substr(p[4], 2, 11)} END {for (u in last) print last[u], u}' "$LOG" | sort

Cross-reference with the sitemap, to find useful pages that were never crawled and URLs crawled outside the sitemap:

curl -s https://example.com/sitemap.xml | grep -o '<loc>[^<]*' | sed -e 's/<loc>//' -e 's#https://example.com##' | sort -u > sitemap-chemins.txt
awk -F'"' '{split($2, r, " "); print r[2]}' googlebot.log | sed 's/?.*//' | sort -u > chemins-explores.txt

comm -23 sitemap-chemins.txt chemins-explores.txt > jamais-explorees.txt
comm -13 sitemap-chemins.txt chemins-explores.txt > explorees-hors-sitemap.txt
wc -l jamais-explorees.txt explorees-hors-sitemap.txt

For a sitemap index, concatenate the child files first. The sitemap itself must be clean: see exclude redirects, errors and noindex pages (opens in a new tab).

With a log analysis tool

  • GoAccess (free): HTML report from the filtered file, with breakdowns by URL, code, day and response time. For a log in the standard combined format: goaccess googlebot.log --log-format=COMBINED -o googlebot.html. For the Nginx seo format suggested above, declare the extra fields:
goaccess googlebot.log --log-format='%h %^[%d:%t %^] "%r" %s %b "%R" "%u" %T "%v"' --date-format=%d/%b/%Y --time-format=%T -o googlebot.html
  • Screaming Frog Log File Analyser: drag-and-drop import, crawler verification by DNS, cross-referencing with a crawl or a sitemap to isolate pages never crawled and orphan URLs. The free version is limited in volume.
  • Oncrawl, Botify, Seolyzer: SEO platforms that ingest logs continuously and cross-reference them with the crawl and Search Console, for large sites.
  • BigQuery or an observability stack (Elastic, Grafana Loki): for hundreds of millions of lines, with the same calculations in SQL.

Reading the results

Finding Likely interpretation Action
Sitemap pages never crawled in 30 days Pages poorly linked, too deep or judged of little use Strengthen internal linking; see identify under-linked pages (opens in a new tab)
Large share of requests on parameterized URLs Crawlable filters, sorting options, session IDs Control URL parameters (opens in a new tab) and identify crawler traps (opens in a new tab)
Many 301s Internal links or sitemap pointing to old URLs Update links to the final URLs
Many 404s on unknown URLs Old addresses, broken external links Redirect those that have an equivalent, leave the others as 404
5xx or 429 served to crawlers Overloaded server or overly strict rate limit Fix 5xx errors (opens in a new tab), review the firewall rules
High response time on one section Heavy queries, no cache Optimize the template, add caching
URLs crawled outside the sitemap and the site Orphan pages or leftovers Detect orphan pages (opens in a new tab)

Monthly deliverable

Record a few indicators every month. Their formulas are industry conventions, to be compared with your own history rather than with a standard:

Indicator Formula Example
Verified Googlebot requests per day total / number of days 13,200
Sitemap coverage over 30 days sitemap URLs crawled at least once / sitemap URLs 78%
Waste share requests on parameterized URLs, in 3xx, 4xx or outside the sitemap / total 31%
Server error share 5xx requests / total 0.4%
Average page response time average of $request_time excluding static files 340 ms
Discovery delay date of first visit − publication date, median across new pages 2 days

Compare these figures with the Crawl stats (opens in a new tab) report: both sources should tell the same story. If waste is significant on a very large site, see optimize crawl budget if warranted (opens in a new tab).

Common mistakes

  • Analyzing origin logs behind a CDN: pages served from the cache are missing, so popular pages appear to be crawled less than they are.
  • Counting fake Googlebots: without DNS or IP range verification, some of the requests come from scrapers.
  • Analyzing a single day: rotation archives logs every day or every week; the current file sometimes covers only a few hours.
  • Turning off logging for static files: CSS and JavaScript resources crawled by Googlebot disappear from the analysis.
  • Forgetting the host: without the Host field, there is no way to tell www, subdomains and http variants apart.
  • Mixing time units: seconds for Nginx, milliseconds for Apache's %{ms}T and for IIS.
  • Aiming for full coverage: not every page needs to be crawled every month; a stable, well-indexed page may be visited rarely.

Frequently asked questions

Why analyze logs if I have Search Console?

Server logs complement Search Console without duplicating it. Google's report gives totals and sample URLs, for Google's crawlers only. Access logs list every request from every crawler, Bingbot and AI crawlers included, with the exact URL, the code received and the response time. Only they let you list the useful pages that were never crawled and the waste on worthless URLs.

How do I know whether a request really comes from Googlebot?

To verify a Googlebot request, run a reverse DNS lookup on the IP address from the log: the resulting name must end in googlebot.com, google.com or googleusercontent.com. Then run a forward DNS lookup on that name: it must return the same address. On large volumes, compare addresses with the IP ranges Google publishes in JSON instead. For Bingbot, the name must end in search.msn.com.

How much log history should I analyze?

Analyze at least thirty days of logs, ideally three months. Googlebot comes back often to popular pages but can leave several weeks between visits to deep or stable pages: a one-day or one-week analysis would wrongly conclude that these pages are never crawled. Remember to include the files archived and compressed by log rotation, and set a documented retention period.

Is log analysis useful for a small site?

For a site with a few hundred pages, in-depth log analysis adds little: the Search Console and Bing Webmaster Tools reports are usually enough. It becomes valuable on sites with tens of thousands of URLs, catalogs with filters, sites that publish a lot, and during a migration. A one-off check of the codes served to crawlers remains useful for sites of any size.

Updated on

Topic checklist (PDF)

And now?

In the “Crawling” topic

  1. Check robots.txt access and syntax
  2. Allow Googlebot on strategic pages
  3. Allow Bingbot on strategic pages
  4. Allow required CSS/JS resources
  5. Declare sitemaps in robots.txt
  6. Generate the XML sitemap automatically
  7. Include only indexable canonical URLs returning HTTP 200
  8. Exclude redirects, errors and noindex pages
  9. Provide a reliable lastmod
  10. Split large sitemaps
  11. Stay within 50,000 URLs and 50 MB uncompressed per sitemap
  12. Submit sitemaps to Google and Bing
  13. Analyze crawl stats
  14. Analyze server logs
  15. Identify crawler traps
  16. Optimize crawl budget if warranted
  17. Check CDN, WAF and anti-bot protection
  18. Check that public pages are accessible without authentication
  19. Monitor DNS and server errors
  20. Set up IndexNow if relevant