There are two ways to answer "which crawlers visit my site": a quick filter pass that counts user-agent strings, and a verified pass that checks every claimed crawler against its published IP ranges. The quick pass takes minutes and tells you roughly who is knocking. The verified pass takes longer and tells you who is actually allowed in. You need both, in that order. If you only do the first, spoofed bots will inflate your numbers.
A crawler is a program that fetches pages automatically and reports back to a search engine or AI provider. A user-agent is the self-declared name string in each request. A server access log is the file where your web server records every request: who asked, what they asked for, when, and what you returned. The log is the only place where the raw truth sits, before any analytics tool touches it.
3 things the log actually tells you
First, the log shows the request line: the method (usually GET), the path, and the HTTP version. Second, it shows the status code: 200 for served, 301 or 302 for redirect, 404 for missing, 5xx for server error. Third, it shows the user-agent and the client IP. Those two fields are the heart of crawler analysis.
What the log does not tell you is whether the crawler indexed the page, stored it in a training set, or cited it in an answer. That distinction matters, and it is the most common overclaim in log reporting. A hit proves a fetch. Nothing more.
Here is a sample log line from an Nginx combined-format log, annotated field by field:
| Field | Example value | What it means |
|---|---|---|
| client IP | 66.249.66.1 | The address that connected. Check against the crawler's published range. |
| timestamp | 29/Sep/2026:10:14:22 +0000 | Request time in the server's timezone. Confirm the zone before comparing with other systems. |
| request line | GET /blog/post-1 HTTP/1.1 | Method, path, protocol version. |
| status code | 200 | What your server returned. 404 and 5xx deserve their own report. |
| bytes sent | 18422 | Response size. A tiny number on a 200 often means a redirect or a block page. |
| referrer | - | Usually empty for crawlers. Not a reliable bot signal on its own. |
| user-agent | Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) | Self-declared. Anyone can copy this string. |
2 approaches side by side: user-agent filtering vs IP verification
The comparison below is the core of this article. Approach A is what most tutorials show: grep the log for known bot names and count. Approach B is what you need before you report anything to a stakeholder: check the IP against the operator's published list.
| Factor | Approach A: user-agent filter | Approach B: IP verification |
|---|---|---|
| Time to run | Minutes. One grep command. | Longer. Needs a current IP list and a reverse DNS step. |
| Resists spoofing | No. The user-agent is free text. | Yes, if the list is current. Check forward-confirmed reverse DNS. |
| Works for Google and Bing | Partly. Good for a rough count. | Yes. Both publish verified range files. |
| Works for AI crawlers | Only as a hint. Many AI operators publish ranges, some do not. | Yes where ranges exist. Mark the rest as unverified. |
| Strong use | First pass, spotting surprises, quick sanity check. | Reporting, blocking decisions, access-control rules. |
Google documents how to verify Googlebot using reverse DNS and its published IP ranges at developers.google.com/search/docs. Bing publishes a similar page for Bingbot at bing.com/webmasters. OpenAI publishes a crawler IP range list for its GPTBot and related crawlers on its platform documentation. For any crawler whose operator does not publish a range, treat the hit as unverified and say so.
4 places your logs live, and what each one misses
Apache writes access logs to access.log in the configured log directory, usually /var/log/apache2/ or /var/log/httpd/. Nginx writes to access.log under /var/log/nginx/ by default. On shared hosting, cPanel exposes the file under Metrics > Raw Access. On a CDN, you often have to turn logging on: the CDN terminates the connection, so your origin server may only see the CDN's edge IP, not the crawler's.
That last point is the biggest trap. If you sit behind Cloudflare or a similar proxy, the client IP in your origin log is the proxy, and the real crawler IP arrives in a header such as CF-Connecting-IP. Cloudflare documents this in its support pages. If you read the origin log without checking that header, every crawler looks like one IP.
- Retention: many hosts rotate logs daily and delete after 7 to 30 days. Check before you plan any month-on-month comparison.
- Sampling: CDN analytics dashboards often sample. Raw log exports usually do not. Prefer raw exports for counting.
- Bot mitigation: if a WAF blocks a crawler, you may see a 403 instead of a 200, or nothing at all. A missing crawler is not proof it never came.
5 steps to verify a claimed crawler
Step one: take the client IP from the log line. Step two: run a reverse DNS lookup on it, for example dig -x 66.249.66.1 or host 66.249.66.1. Step three: check that the returned hostname ends in the operator's documented domain, such as googlebot.com or search.msn.com. Step four: run a forward lookup on that hostname and confirm it returns the same IP. This is called forward-confirmed reverse DNS, and Google's own verification page describes the method.
Step five: confirm the IP falls inside the operator's published range file. If any step fails, label the hit as a spoofed or unverified user-agent. Do not block it on that basis alone without checking your traffic patterns first.
To automate this, most log analyzers let you import a list of verified ranges and tag matching lines. You can also do it in a spreadsheet: export the distinct IPs, run the lookups, and join the results back to the raw log. The exact tool matters less than doing the join.
3 error patterns worth a separate report
A 404 hit from a crawler means the crawler asked for a URL you do not serve. Common causes: a deleted page still in a sitemap, a broken internal link, or a URL variant with a trailing slash mismatch. A 5xx hit means your server failed during the fetch. Repeated 5xx from the same crawler over several days is a signal to check server capacity, not a content problem.
A 200 with a very small byte count is the third pattern. It often means a soft block: a challenge page, a consent wall, or an empty JavaScript shell. If an AI crawler gets that response, it may record an empty page. Check what your server actually returns to the crawler's user-agent before assuming the content was read.
3 ways to turn log data into action
For SEO, compare crawler hit frequency against your sitemap. Pages that get crawled weekly but never indexed are a different problem from pages that are never crawled. The log tells you which side of that line you are on.
For AI visibility, count verified hits from AI crawlers per section of the site. A section that gets many hits but never appears in AI answers may have a content or structure problem. A section that gets no hits at all may be blocked by robots.txt or unreachable. Check robots.txt before drawing conclusions.
For access control, use the verified IP list to decide what to allow. Google, Bing, and several AI operators publish ranges you can allowlist. Anything outside those ranges that claims to be a crawler is, by definition, not verified.
Key Facts at a Glance
- Definition: A server access log records each request's IP, timestamp, path, status code, and user-agent.
- Verification: Use forward-confirmed reverse DNS plus the operator's published IP range, as documented by Google Search and Bing Webmaster guidelines.
- CDN caveat: Proxy setups can hide the real crawler IP; check the proxy's documented client-IP header.
- What logs prove: A fetch happened. Indexing, training use, and citation are separate and need separate evidence.
- Retention check: Confirm your host's log rotation window before any month-on-month comparison.
- Unverified hits: If no published IP range exists, label the hit unverified rather than assuming identity.
Frequently Asked Questions
How do I verify a crawler is really who it claims to be?
Take the client IP from the log, run a reverse DNS lookup, confirm the hostname ends in the operator's documented domain, then run a forward lookup to confirm it returns the same IP. Finally, check the IP against the operator's published range file. If any step fails, treat the hit as unverified.
Which AI crawlers should I track in my logs?
Track the ones whose operators publish IP ranges and user-agent documentation, such as OpenAI's crawlers. For any crawler without a published range, count the hits but mark them unverified. The list changes, so check the operator's documentation rather than relying on a static list.
How do I get server logs from my host or CDN?
On Apache or Nginx, read the access log file in the configured log directory. On cPanel, use Metrics > Raw Access. On a CDN, enable log export in the dashboard, then download the raw file. If you sit behind a proxy, also check the header that carries the real client IP.
Can server logs prove AI crawlers are reading my content?
No. A log hit proves a fetch happened. It does not prove the content was indexed, used in training, or cited in an answer. To support those claims you need separate evidence, such as indexing checks or manual citation checks.
What tools analyze AI crawler hits for free?
Command-line tools such as grep, awk, and sort handle most first-pass filtering at no cost. Spreadsheets work for the IP verification join. Several open-source log analyzers exist, but check whether they support custom IP range imports before relying on them for verified counts.
