Skip to content
AI crawlers are hitting more 404s; fix the entry points before discussing bans

AI crawlers are hitting more 404s; fix the entry points before discussing bans

A content site’s log dashboard grouped by User-Agent, originally meant to see how much bandwidth AI crawlers eat, but the first thing visible was the 404 share: single digits site-wide, but 30–40% in the AI crawler column. The two usual next moves are adding Disallow to robots.txt or blocking by UA at the WAF. After doing so, 200-level crawl volume drops too, and citations don’t come back.

Both moves were made too early.

My read: a high 404 rate for AI crawlers is mostly not it crawling wildly, but off-site entry URLs having expired. Search engines have sitemaps, historical crawl records, and recrawl scheduling; when a page moves, they catch up within weeks. Agents have none of that. They decide per request, get a 404, and leave.

First split 404s into four categories; mixing them guarantees misjudgment

In the logs all 404s look the same, but the causes are completely different, and the handling can even be opposite. At minimum, split into four categories.

The first is genuine dead links. Articles taken down, redesigns changing slugs, the site migrating from /post/ to /blog/ — internal links cleaned up, but external citations still point at the old address. This kind of 404 means others still remember your history.

The second is parameter URLs. Links with utm_source, ref, share tokens, or from fail route matching and return 404 directly. Many AI entry points append source parameters when redirecting to external links, and links users copy from share buttons are also full parameterized URLs.

The third is form variants. Trailing slash vs. no trailing slash, case, index.html, http vs. https, www vs. non-www. To you it’s the same page; to the server it’s four addresses, three of which may be 404.

The fourth is status code mismatch. Blocked by the WAF but returning 404 instead of 403, or a single-page app without route fallback, where any unmatched path returns the same 404 shell.

Looked at together, the only conclusion is “lots of 404s,” and then you go block crawlers. The way to look at them separately isn’t complicated: group logs by UA, then by path prefix, then overlay status code, and build a pivot table.

Here’s the criterion. If the top 10 path patterns cover over 80% of 404s, it’s an entry problem — a few redirect rules will eliminate most of it. If 404s are evenly spread across hundreds of paths, each appearing only once or twice, that’s when parameter enumeration deserves consideration. The two are handled in completely opposite ways.

When a search engine finds a 404, it checks the sitemap, internal links, and redirects, and corrects itself after a few rounds. An agent makes one decision per session. It gets URLs from only three sources: citations in other pages’ body text, old addresses in model memory, and full links pasted by users. None of these three sources update in sync when you change internal links.

The result: old links already cleaned up internally are still alive in others’ citations; the agent crawls them, gets a 404, and skips that address for this round. It won’t guess where the new address is. So the 404 here isn’t “it’ll fix itself next time” — that citation is lost on the spot.

Parameter URLs are even more typical. Agents won’t normalize for you, and you can’t expect them to read canonical like a search engine to decide which to crawl. They fire the URL first and deal with the 404 after. The same parameter page returning 404 only wastes one crawl budget for a search engine, but for an agent it directly loses a possible citation.

The diagram below is the decision chain from logs to handling: branch first, then decide what to change.

flowchart TD
    A[日志按 UA 分组] --> B{404 集中在少数路径}
    B -- 是 --> C[查站内外旧链接]
    B -- 否 --> D[查参数与分页组合]
    C --> E[旧地址 301 到新地址]
    D --> F[参数归一或限流]
    E --> G[看引用是否回流]
    F --> G

One counterintuitive point: returning 404 for these requests is better than a 301 to a wrong page, but far worse than a 301 to the correct page. The worst in between is returning a 200 empty shell — the agent thinks it got content and interprets the blank as body text, which is harder to correct than plainly saying there’s nothing.

Redirect with 301 where you can; don’t use 410; normalize instead of blocking

Status codes are instructions for machines to read, not error messages for humans. For the same old address, the four responses have very different consequences.

Situation Should return Consequence
Page moved, external citations remain 301 to new address Citation moves to the new page
Content permanently removed 410 Removed from candidates faster than 404
Only has parameters 301 to parameterless version More reliable than 200 plus canonical
Unpublished or token expired 403, with no content returned Keeps it out of the candidate pool

404 is the worst default. It neither says it moved nor says don’t come back; the agent only knows there’s nothing here. 410 is clearer, but use it only when content is truly permanently removed — using 410 for a redesign URL change is actively giving up that citation.

The risk with 301 is in the mapping. Redirecting an old address to an unrelated page makes the agent treat that page as a replacement for the old content, which is harder to correct than a 404. So go through the redirect table manually, one by one; don’t write a single regex wildcarding all /post/ to the /blog/ homepage. The homepage can’t carry specific content — the agent gets a page unrelated to the original question, the citation won’t come back, and it will skew its understanding of the site.

Parameter URLs have two treatments. 301 to the parameterless version is simple and direct, and agents will definitely follow it; or return 200 with canonical pointing to the parameterless version, which is safer but requires an extra render, and you can’t count on agents reading canonical. I lean toward the former, for the reason above: they fire the URL first and look at the result after.

An entry checklist you can follow directly

Ordered by return on investment: fix the widest coverage first, then the long tail.

  1. Site-wide URLs with tracking parameters: 301 to the parameterless version
  2. Old paths left by site redesigns: write mappings one by one, no regex wildcards
  3. Unify trailing slashes and case, keeping only one form
  4. Configure route fallback for single-page apps; don’t let unmatched paths spit out a 404 shell
  5. Drafts, previews, and tokenized share links: add authentication and ensure no body content is returned

The first two can be done with nginx, no application code changes needed.

NGINX9 lines
1
2
3
4
5
6
7
8
9
# 带追踪参数的 URL 统一回到无参版本
# if 在 nginx 里通常要少用,但只做 return 301 是安全的
if ($args ~* "(^|&)(utm_source|utm_medium|utm_campaign|ref|from|share|fbclid)=") {
return 301 $scheme://$host$uri;
}

# 旧路径逐条映射,不要一把梭到首页
location = /post/old-slug {
return 301 /blog/new-slug;

The first rule only works if the parameterless path itself returns 200. If it’s also a 404, the redirect just moves the 404 to another address — the 404 count in the logs won’t drop, only a batch of 301s will appear. Run an availability check on target addresses before going live.

When rate limiting and blocking actually apply

The number of pages on a site is a known quantity. Use it as the denominator to judge whether a UA is crawling normally or enumerating.

Normal magnitude: an AI crawler’s daily request volume is roughly one to three times the site’s actual page count; sites with frequent content updates reach about five times, due to multiple recrawl rounds. If a UA’s daily count of unique URLs reaches more than ten times the page count, and the paths are full of enumerable parameters like p, page, and s, then it’s not an entry problem — the parameter space has been opened up. That’s when rate limiting and robots make sense, because what you’re blocking is request volume, not address errors.

What should really be blocked at the entrance isn’t AI crawlers—it’s previews and drafts. Once a tokenized share link enters some proxy’s candidate pool, unpublished content has leaked, and such links naturally expire, after which they’re just a pile of 404s. They shouldn’t rely on 404s as a fallback; noindex and an expiry should be added at the moment the link is generated.

There’s also an ordering problem here. Disallow in robots isn’t free—what it turns off is visibility itself. The request volume you block may only be a few percentage points, but if what you block is the main crawl entry point, citations disappear along with it, and that disappearance is gradual—you only notice weeks later. So reserve blocking for the one case of “confirmed enumeration.”

What metrics to watch after the fix

Don’t stare at the total 404 count. The total fluctuates with the proxy’s crawl rhythm; a halving may just mean it didn’t come this week, unrelated to what you changed.

Watch three. First, 404 path concentration—is the share of the top 10 patterns falling? If it’s falling, normalization is working. Second, 301 hit volume—how many requests are being caught; this number should rise first, then stabilize. Third is whether citations of 200 pages in AI answers have come back—this can’t be seen in logs.

Logs can tell you the proxy came, how many times, and what it fetched; they can’t tell you who it ultimately cited or which page it cited. That requires a separate observability layer—for example, what Agentrace does is the GEO layer: seeing whether your content gets cited in AI search and which URL is cited (https://geo.moreyin.cn). The order can’t be reversed: first fix the entry points so the proxy reliably gets 200s, then observe citations. Otherwise what you see is “citations haven’t come back,” when the actual reason is that it never crawled at all.

Next time 404s suddenly spike in the logs, first run a UA × path-prefix pivot, sorted by path pattern. If the top 10 patterns cover over 80%, write 301s one by one—don’t touch robots. If they don’t cover 80%, check parameters and pagination to see whether some UA is enumerating. If neither, then consider rate limiting. Before changing config, at least print out the top 10 path patterns and take a look—that one look is usually more useful than a week of alerts.

About this Post

This post is written by Lu's Blog, licensed under CC BY-NC 4.0.

#Crawler Logs #Entry Point Governance #GEO

Comments