如何通过分析服务器日志优化 AI 搜索可访问性
How To Analyze Server Logs for AI Search
文章提出了面向 AI 搜索的服务器日志分析六步框架,指导团队排查 AI 智能体抓取超时、防火墙拦截与客户端渲染空壳等技术问题。指南强调通过 IP 和签名验证真实 Bot 身份,并重点监控代表客户端主动断开连接的 499 状态码与未命中缓存请求。相关数据分析显示,OpenAI 抓取经常超时的页面所获得的 AI 引用量比正常页面低 18 倍。
原文提供了排查 AI 爬虫抓取超时的日志分析框架,读者可据此诊断核心页面未被 AI 搜索引用的底层网络与渲染障碍。
Most teams have spent the past two to three years pouring time and budget into AI search. But many aren’t confirming whether AI bots can reach their priority pages or give up before they finish loading.
I’ve been in SEO for more than 15 years, and I still don’t see enough focus on server log files, where those answers live.
In this article, I’ll show you how to get your server logs, identify verified bots, and find problems preventing AI crawlers from receiving your content.
What’s in a log file?
A log file contains one line per recorded request. Every time a person, crawler, or scraper requests something from your server, the server logs the request.
Here’s an example:
203.0.113.42 [12/Aug/2026:14:28:19] "GET /guides/pricing" 200 48213 "ChatGPT-User/1.0"From left to right, this line tells you:
- Who asked: The visitor’s IP address — 203.0.113.42
- When they came: The date and time down to the second — 12/Aug/2026:14:28:19
- What they wanted: The exact page requested and the request method — GET /guides/pricing
- How it went: The response code — 200
- How much you sent: The response size in bytes, which can help you spot a page that returned less content than expected — 48213
- Who they said they were: The declared user-agent — ChatGPT-User/1.0

A log file repeats that line, sometimes with more fields, potentially millions of times: one for every request it records. These are records of actual requests captured by your logging setup.
Prompt tracking shows what an assistant said when someone asked a specific question. Referral data in analytics tells you when a human clicked through. Neither tells you whether the assistant could actually get to your page in the first place, but the log does.
Six requests, five different stories

Note: The rt and cache fields at the end aren't standard in every setup. More on this in step 2.
The first two rows are clean:
Googlebot and OAI-SearchBot both asked for the pricing page and received a 200 OK status code and the full 48,213 bytes from the cache in under half a second. This is what good looks like.
Row 3 gave up waiting:
ChatGPT-User is the agent that fetches a live page in response to user requests. It requested the same page as rows 1 and 2, but it waited more than 31 seconds due to a cache miss and hung up.
The server recorded a 499 status code and sent no bytes.
Since these logs are configured to record cache status, consider evaluating other uncached requests to see whether they’re slow as well.
Row 4 is a human:
The request is for the same page, but the user-agent identifies a regular browser, and the referrer points to ChatGPT. Track these referred human visits separately from bot requests.
Row 5 shows a 200 OK response, but it’s only a shell
GPTBot received a successful response, but only a fraction of the expected bytes. If the page relies on client-side rendering, the bot may have received a template without the content. Investigate by fetching the URL without JavaScript and checking what comes back.
Row 6 suggests your firewall is blocking access
Claude-User asked for the San Diego location page but received a 403 Forbidden in only six milliseconds. With a response this fast, a security rule likely blocked it before the request reached the application. Check your Web Application Firewall (WAF) or bot management rules to confirm.
An important note:
Log files only show requests captured at the layer you pulled them from, within the chosen time frame. If your CDN answers most requests from cache and you’re only looking at origin server logs, you’re missing traffic. Sampling excluded hostnames and subdomains logged elsewhere can also cause an incomplete dataset.
A 6-step framework to analyze log files for AI search
Step 1: Get the right logs and open a manageable sample
Where you get these files depends on your organization and its tech stack. I’d recommend starting in three places:
- Tools your company already pays for: It’s surprisingly common to already have a platform that ingests log data.
- Your CDN (content delivery network): If you need to go to the source, CDN logs are the gold standard. Talk to your DevOps or hosting team to get access.
- Your web server: Don’t discount it, but remember that when a page is cached at the edge, the CDN answers the request, and your origin server never sees it. Origin logs, therefore, undercount requests for cached pages.

One tip to save yourself and your team a lot of grief is to ask for a sample first. A few hundred lines should be enough to check whether the file opens, your tools can read the format, and it contains the fields you need. Do this before someone spends a week exporting 40GB you can’t use.
Step 2: Ask for the right data
If you ask your DevOps team for “the log files,” you might get a handful of fields but miss the ones that matter.
Specify your fields by name:
- The requester IP address
- The page requested, and the method (e.g., GET or POST)
- The date and time
- The user-agent (what the visitor called itself)
- The response code
- The bytes sent (how much was actually shipped)
Two more depend on your stack, but are worth asking for:
- Response time: How long the server took to answer. This typically isn’t in nginx’s default log format, but your CDN or load balancer may already record it.
- Cache status: Whether the request was served from cache or passed to your origin server. It’s often the first clue when a slow request appears, helping you check whether cache misses are causing the delay.
Here’s a sample email you can adapt:
Subject: Log file export request for SEO analysis
Hi [Name],
I’m looking into how search engines and AI crawlers are accessing our site, and I’d like to start with our access logs. Could you pull a small sample first (a few hundred lines is fine) so I can confirm the format works before we export anything larger?
Source: [CDN — e.g., Cloudflare, Akamai, Fastly] if available, otherwise [web server — e.g., nginx, Apache]
Domain(s): [example.com, plus any subdomains]
Required fields:
- Client IP address
- Requested URL and request method (GET, POST, etc.)
- Date and time of the request
- User agent
- HTTP response code
- Bytes sent
If available:
- Response time (how long the server took to respond)
- Cache status (HIT, MISS, etc.)
Once the sample checks out, I’ll need roughly [two weeks] of data for the full analysis. Let me know what format is easiest to export (CSV or raw log files both work), and whether there’s anything I should know about how our logs are sampled or filtered.
Thanks!
[Your name]
How much data?
There is no perfect answer to this, but once you know the output checks the boxes, consider these starting points:
- One to two weeks helps to identify a specific problem
- One to two months shows general crawling behavior
- A longer time range (90 days or more) helps if you care about training crawlers, which visit on a lower frequency
Step 3: Open the files and evaluate
You don’t need a data warehouse to get started. Here are two options:
- Use a tool your company already pays for: Platforms such as Profound can help you process and evaluate your log files.
- Start with Screaming Frog’s Log File Analyser: A separate tool from its SEO Spider that lets you import logs and detects AI bot user agents.
An important note:
Enable bot verification when importing logs. In Screaming Frog’s Log File Analyser, look for “Verify Bots When Importing Logs” to ensure supported bots are who they claim to be. I’ll explain why this matters in the next step.
If your logs already pipe somewhere, use that, especially if it connects them to your crawl data. For large sites with millions of log rows, BigQuery and SQL can help, but you don’t need either to get started.
Step 4: See who’s knocking
Once your log files are open, start by figuring out who’s showing up. This is where many people go wrong, as AI bots fall into four categories, each serving a different purpose and operating on a different timeline.
- Tier 1 Training: Collecting text to train a model
- Tier 2 Indexing: Building the list, an AI assistant searches to find content it may cite
- Tier 3 Live fetching: Fetching your page in response to someone’s question
- Tier 4 Acting: An agent works through your site on someone’s behalf

The way to think about tiers three and four is that tier 3 reads your page, while tier 4 uses your site. For now, agents are mostly evaluating and then handing off to the human. Google is currently a narrow exception, where eligible merchants can let the agent complete a purchase with the customer's confirmation.
Here’s a sample of what you’re likely to see in each group as of October 2026. These names can change as models launch and new players enter the space, and there are plenty of smaller bots not listed here:

A helpful tip: “-User” in the name usually means a live fetch, but treat this as a naming convention rather than a rule. Google-Agent also acts on user requests and identifies itself in the user-agent string. OpenAI’s browser agent uses signed request headers for verification.
This brings us to the bigger problem: checking whether a bot is who it claims to be.
The two mistakes many sites make
Trap 1: Blocking the wrong bots
Let’s use OpenAI as an example. Blocking GPTBot tells OpenAI not to use your content for model training, which is a legitimate business decision. Blocking OAI-SearchBot, though, can prevent your content from appearing in ChatGPT search answers. A blanket “block AI bots” rule can block both.
Review your robots.txt and CDN rules to find out which bots are blocked. If someone tells you they blocked AI bots, your first question should be: “Which ones?”
Trap 2: Believing what the bot says it is
A user-agent is a name the requester gives itself. Anyone can override it in a browser or a crawling tool by adding “GPTBot” to a request header. Scrapers can inflate your numbers, and security rules intended to block fake bots can accidentally block real ones too.
Bot verification helps flag these impostors before you count their requests. Depending on the operator, verification can involve checking published IP ranges, confirming DNS records, or validating signed request headers.
Step 5: What to look for
This post focuses on AI bots, but log file analysis also helps you evaluate crawl budget usage and spot crawling inefficiencies in traditional search. Don’t sleep on your log files, especially on large sites where crawl budget optimization plays a bigger role.
Once you’ve opened your logs and filtered to verified bots, focus on three questions:
- Are they getting in? Which pages do AI bots visit?
- What do they get? Do they receive your page or an error?
- Do they wait for it? Or does your server take too long to respond?
Are they getting in?
There are two main things to evaluate here:
- Pages no AI bots have visited: These pages are invisible to AI search, however well they rank in Google. If your money pages are on this list, investigate why crawlers can’t find or reach them.
- Pages only the bots know about: These are old URLs that someone linked to years ago, but bots continue to request. Check whether they should return a real page or redirect to a relevant replacement, since something out there is still asking for them.
Both lists are easier to compile than they sound. Run a normal crawl using Moz Site Crawl, export the All Crawled Pages report as a CSV, and compare the URLs against your log file data in a spreadsheet or log file analyzer.

The fix for both issues falls under technical SEO: proper internal linking strategies and XML sitemaps.
What do they get?
Next, look at the HTTP response codes each bot receives:
- 200 OK: The bot received a successful response, but check the bytes sent to ensure it got the full page.
- 301/302 Redirection: Check for multiple redirect hops or a redirect loop.
- 403 Forbidden: You turned the request away. Check your firewall or bot settings.
- 404 Not Found/410 Gone: The page is unavailable, but bots are still requesting it. Consider redirecting if you have a relevant replacement.
- 499 Client Closed Request: The client closed the connection before the response finished. More on this in a moment.
- 500 Server Error: Your server couldn’t complete the request, and the AI bot didn’t return.

Focus on error rates per bot rather than site-wide. Even a small error rate can mean losing valuable live traffic from AI assistants, such as ChatGPT.
To investigate, start with 403s; an unintended firewall or bot management rule may be blocking legitimate requests.
Do they wait for it?
This is a question many audits skip. Look at average response times by bot and folder, focusing on two patterns:
- One bot getting slower responses than the rest
- One section of the site running slower than the site as a whole
This is important because a search engine crawler may wait for a slow page to load or return later. An assistant answering a question has a person waiting for an answer, so they may give up before your server delivers the content.
The previous questions focused on whether a bot can reach your page. This one asks whether it sticks around long enough to read it. That’s where the 499 status code comes in.
Step 6: Investigate the 499s
Let’s go back to the third row from our earlier log example:
23.102.140.7 [12/Aug/2026:14:32:07 +0000] "GET /guides/pricing HTTP/1.1" 499 0 "-" "…ChatGPT-User/1.0" rt=31.412 cache=MISSThe 499 status code means “client closed request.” The requester hung up before your server finished sending it.
This isn’t an official HTTP status code; rather, nginx invented it, and many CDNs and load balancers adopted it (some systems log it under a different label).
In this example, ChatGPT-User disconnected after more than 31 seconds on a cache miss, and the server sent no bytes. It makes response time worth investigating, though the code alone doesn’t tell you why the requester disconnected.
This is why I think 499 is one of the most interesting status codes in your logs because it records a decision someone else made about you.
However, it’s also easy to miss. Monitoring focused on 500-level server errors can overlook 499s. At a glance, they look like the visitor’s fault, so teams may dismiss them. But if they’re happening to ChatGPT-User or Claude-User, the assistant may have to answer the user’s question without citing your content.
How to investigate repeated 499s
A single 499 isn’t strong proof of anything. People can close browser tabs, and bots can get rate-limited or restarted. As with the other status codes, look for a pattern.
Check repeated 499s against:
- Response time: Check how long the request lasted before the client hung up. A 499 at five to six seconds tells a different story than one at 200 milliseconds.
- Cache status: Look for 499s clustered on cache misses. If cached requests for the same URL are fast and uncached ones time out, this might be the culprit.
- The affected URLs: Check whether failures cluster around a template, folder, or heavy page type. A slow database query behind a single template could explain the pattern.
- Other requests from the same bot: Compare failures across the site. If the bot receives 499s across the board, investigate rate limiting, WAF challenges, or an overloaded origin.
Don’t treat every disconnected request as proof of a slow server, especially when you need other teams to address it. Give your teammates a clear pattern and supporting data to investigate.
The goal is to establish whether the crawler received the page. Your logs show the response code, bytes sent, and if the client disconnected.
Whether fixing the problem leads to more citations or mentions is a separate question that you’ll need to measure in AI answers using tools like Moz AI Visibility.
Is your brand mentioned AI search?
Find AI citations in Moz Pro now!
What the log files tell you to fix
Here’s a high-level list of fixes based on what you’re seeing:

The last row deserves emphasis. Seeing many CSS and JavaScript requests in your logs isn’t, by itself, a reason to block them. Those resources are how some crawlers render and understand your pages.
What does this look like on a real site?
Several months ago, a client came to us at iPullRank with a clear ask to prove short-term impact with a pilot program.
We started with the technical part and noticed that their log files showed issues with access limitations, including a large share of AI crawler requests ending in 499s. We fixed those, along with several crawlability issues.
We ran this alongside a broader AI search program covering content and measurement, so I can’t attribute the results to the log fixes alone. But once we resolved the technical issues, AI visibility increased over the following months.

This isn’t just one client
We expanded the analysis in partnership with Profound, looking at 700,000 pages in April 2026, and here’s what we found:
- Pages that often timed out when OpenAI tried to fetch them received 18 times fewer citations than pages that didn’t
- Pages that failed on more than three-quarters of fetch attempts frequently received no citations

We cover the findings in more detail in our AI Citation vs Page Speed Analysis on the iPullRank site. To be clear, this was a correlational analysis, not a controlled test.
Concluding thoughts: Eligibility is the new ranking
Clear, authoritative, and well-structured content only matters if the assistant receives it. Your log files can help you establish whether your page was eligible.
Here’s how to start this week:
- Send one email: Ask DevOps for a small sample, then two weeks of logs with the six essential fields from step 2, plus response time and cache status where available.
- Open the logs: Use a tool such as Screaming Frog’s Log File Analyser. Enable bot verification where supported and prioritize verified requests from “-User” agents and Google-Agent.
- Investigate access failures: Start with 403s and repeated 499s on priority pages, then work through the remaining redirects and errors.
The author's views are entirely their own (excluding the unlikely event of hypnosis) and may not always reflect the views of Moz.
来源:Moz Blog · moz.com