ClaudeBot Documentation Crawling: Get Docs Read by Claude
ClaudeBot documentation crawling only feeds training. We checked 40 docs sites for what Claude's answers need: robots.txt, firewall, raw HTML, llms.txt.
Kazi Khalid Hasan Tamim · BugViso Team
14 min read
ClaudeBot is not the crawler that puts your docs in Claude's answers. Anthropic runs three bots: ClaudeBot collects training data, Claude-SearchBot indexes pages for Claude's search results, and Claude-User fetches a page when someone asks Claude about it. So ClaudeBot documentation crawling only feeds training. To get docs read and cited, let the last two through robots.txt and your firewall, and serve the text in the raw HTML.
We checked 40 well-known documentation sites against those three rules. Robots.txt was almost never the problem. A firewall rule and a JavaScript-only page were.
Data used: 40 public documentation pages (one per site: MDN, Python, React, Stripe, AWS, Microsoft Learn, Apple and 33 more), checked on 2026-12-05 with the script in this post. For each page: the RFC 9309 robots.txt verdict for ClaudeBot, Claude-SearchBot and Claude-User; the HTTP status for a browser user agent and for a Claude-SearchBot user agent; words and
<pre>code blocks in the raw HTML; and whether/llms.txtexists. One page (OpenAI's platform docs) served our script a bot challenge, so its content numbers are excluded.
Which Anthropic Crawler Does What
Anthropic's crawler documentation lists three bots, and only two of them affect whether Claude can read your docs when answering. All three honor robots.txt, including the non-standard Crawl-delay line.
| User agent | What Anthropic says it does | What blocking it does |
|---|---|---|
ClaudeBot | Collects web content that could be used for model training | Excludes your future pages from training data |
Claude-SearchBot | Crawls the web "to improve search result quality for users" | May reduce your visibility and accuracy in Claude's search results |
Claude-User | Fetches a page when a Claude user's question needs it | May reduce your visibility in user-directed web search |
Two tokens still turn up in robots.txt files: anthropic-ai and Claude-Web. Anthropic's page no longer mentions either. Rules for them do no harm, but they don't control any of the three current bots.
The practical split is the same one OpenAI uses with GPTBot and OAI-SearchBot: training on one side, answers on the other. You can block training and still be readable in answers. Our guide to checking AI crawler access in robots.txt covers every major AI crawler side by side.
ClaudeBot Documentation Crawling: What 40 Docs Sites Do
Of 40 documentation pages, 39 allowed all three Anthropic crawlers in robots.txt, yet one blocked Claude at the firewall and one served almost no text without JavaScript. Here is the full tally.
| Check | Result (n = 40) |
|---|---|
| robots.txt allows ClaudeBot, Claude-SearchBot and Claude-User on the page | 39 |
| robots.txt names any current Anthropic token | 1 (Shopify: ClaudeBot, Claude-User) |
robots.txt names Claude-SearchBot | 0 |
| robots.txt names a retired token | 1 (Redis: Claude-Web) |
| Claude-SearchBot user agent gets a different status than a browser | 1 (Microsoft Learn: 403 vs 200) |
| Raw HTML under 50 words (content needs JavaScript) | 1 of 39 measurable (Apple Developer Documentation: 5 words) |
| Median words in the raw HTML | 1,034 |
<pre> code blocks in the raw HTML of the page | 13 of 40 |
/llms.txt returns a text file | 20 of 40 |
Three results deserve a closer look.
Node.js blocks every crawler, not just Claude's. Its robots.txt has Disallow: /docs/ for User-agent: *, with Allow lines for other paths. The page we tested, /docs/latest/api/, falls under the disallow. This is a site-wide choice, not an AI policy, and it shows why you test the exact URL rather than the homepage.
Microsoft Learn answers a Claude user agent with 403. A browser user agent and a generic ExampleBot user agent both got 200 on the same URL. A request carrying the ClaudeBot or Claude-SearchBot token got 403. Our requests came from an ordinary IP address, not from Anthropic's published ranges, so the firewall may simply be catching a spoofed bot. A real Claude-SearchBot from Anthropic's network could still get through. Only your own server logs can settle that for your site.
Apple's documentation index is an empty shell before JavaScript runs. The HTML is 17 KB and holds five words of text. A crawler that doesn't render JavaScript sees a title and nothing else. The other short pages in the sample (GitHub, Svelte, Docker and the Rust book, 127 to 226 words) are short landing pages, not JavaScript shells.
The robots.txt Rules Claude's Crawlers Follow
If you want your docs in Claude's answers, make sure Claude-SearchBot and Claude-User aren't disallowed, then decide about ClaudeBot separately. Most sites need no Anthropic-specific lines at all: with no group naming them, the three bots follow your User-agent: * rules, as RFC 9309 specifies.
Add explicit groups only when your * rules are strict, or when you want to treat training differently:
# Everyone: docs are public, the app is not
User-agent: *
Allow: /
Disallow: /account/
# Claude answers may read the docs
User-agent: Claude-SearchBot
User-agent: Claude-User
Allow: /docs/
Disallow: /account/
# Optional: opt out of training only
User-agent: ClaudeBot
Disallow: /
Sitemap: https://example.com/sitemap.xmlTwo RFC 9309 rules catch people out. First, a bot that matches a named group ignores the * group completely, so copy your private-path disallows into every named group. Second, the longest matching path wins, and Allow wins a tie. Allow: /docs/ beats Disallow: / for /docs/install, whatever order the lines are in.
If crawl load is the worry, Anthropic supports Crawl-delay (for example Crawl-delay: 1 under User-agent: ClaudeBot). That slows a bot down without hiding your docs from it.
Check the Firewall, Not Just robots.txt
A robots.txt allow means nothing if the CDN or WAF refuses the request. The Microsoft Learn result is the pattern to look for: robots.txt allows the bot, but a Claude-token request gets 403 while a browser gets 200.
Bot rules usually live in a CDN's managed rules: Cloudflare's AI bot settings, AWS WAF bot control, or a "block AI scrapers" toggle someone switched on during a scraping scare. Those toggles often match on the user-agent token, which puts the search bots in the same bucket as training scrapers.
To check from the outside, request a docs page twice with curl -s -o /dev/null -w '%{http_code}': once with a browser user agent, once with a string containing Claude-SearchBot. A 403, 401, 429 or challenge page on the second request is worth chasing. Then confirm in your logs: Anthropic publishes the IP ranges its bots use at claude.com/crawling/bots.json (linked from its crawler page), so you can tell real Claude traffic from impostors.
Anthropic also says its bots don't try to get past CAPTCHAs. A challenge page is a block, even if it lets browsers through after a second.
Serve the Docs in the Raw HTML
Vercel's analysis of AI crawler traffic found that the major AI crawlers, ClaudeBot included, fetch JavaScript files but don't run them. Whatever your docs show only after hydration is invisible to them. Anthropic's own page says nothing about rendering, so build as if they don't.
Most documentation frameworks already get this right. Docusaurus, Nextra, MkDocs, Sphinx, VitePress and Starlight all write static HTML for every page. The risk comes from custom docs apps that fetch content in the browser, and from tabbed code samples where only the first tab is in the HTML.
The test takes one line: curl -s https://docs.example.com/page | grep -c "a phrase from the page body". If it prints 0, the text arrives through JavaScript. Our deeper study of whether AI crawlers render JavaScript has the per-framework fixes.
Code samples need the same check. Only 13 of the 40 pages had a <pre> block in the raw HTML. For index pages that is expected, but on a reference page a missing <pre> usually means the samples are injected by a script, and a crawler sees the prose without the code.
Structure Pages So Answers Quote Them Correctly
Getting crawled is half the job; the other half is that an answer engine lifts a passage that is still correct out of context. Our study of how AI engines cite documentation pages found that wrong answers often came from correct pages read partially. These four habits reduce that risk.
Open each section with a one-sentence definition. Name the thing and say what it does, in 30 to 50 words, before any history or caveats. That sentence is what gets quoted.
## `PerformanceNavigationTiming.responseStart`
`responseStart` is the timestamp when the browser receives the first byte of the
response. Time to First Byte is `responseStart - requestStart`.Put parameters in a real table. Name, type, whether it is required, the default and one line of meaning. A table keeps each value next to its parameter, so a quoted row stays true.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
dataset_id | string | yes | — | ID of the dataset to report on |
format | string | no | "pdf" | "pdf" or "csv" |
timeout_ms | integer | no | 30000 | How long to wait for the report |
(Example endpoint for a fictional product.)
Make every code sample complete. Imports, the client setup and error handling, so a copied snippet runs. A snippet that depends on a variable defined three sections up gets quoted without it.
Map errors to fixes in a table. Status code, error string, cause, fix. Developers paste error strings into assistants, and a row that pairs the string with its fix is the passage that answers them.
An /llms.txt file is optional extra. Half the sample (20 of 40) has one. Anthropic's crawler page doesn't mention it, and no major AI provider has said it uses the file to pick sources, so add it after the checks above pass, not instead of them. Our guide on what llms.txt does and doesn't do has the format.
A Script to Check Your Own Docs
This script runs the same checks we ran on the 40 sites, for any list of documentation URLs. It needs Python 3.9+ and nothing else.
"""Check whether Anthropic's three crawlers can read a documentation page.
Usage: python docs_claude_check.py https://docs.example.com/page [more URLs]
For each URL: the robots.txt verdict (RFC 9309) for ClaudeBot, Claude-SearchBot
and Claude-User, the HTTP status a browser and a Claude-SearchBot user agent get,
how many words and code blocks the raw HTML holds before JavaScript runs, and
whether /llms.txt exists. Standard library only.
"""
from __future__ import annotations
import html
import json
import re
import sys
import urllib.error
import urllib.request
from concurrent.futures import ThreadPoolExecutor
from urllib.parse import urlsplit
BOTS = ("ClaudeBot", "Claude-SearchBot", "Claude-User")
BROWSER_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0 Safari/537.36"
# Anthropic doesn't publish a full Claude-SearchBot UA string; firewalls match the token.
CLAUDE_UA = "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Claude-SearchBot/1.0; +https://www.anthropic.com)"
def fetch(url: str, ua: str, limit: int = 3_000_000) -> tuple[int, str]:
req = urllib.request.Request(url, headers={"User-Agent": ua, "Accept": "text/html,text/plain,*/*"})
try:
with urllib.request.urlopen(req, timeout=20) as r:
return r.status, r.read(limit).decode(r.headers.get_content_charset() or "utf-8", "replace")
except urllib.error.HTTPError as e:
return e.code, ""
except Exception:
return 0, ""
def groups(robots: str) -> list[tuple[list[str], list[tuple[str, str]]]]:
"""Parse robots.txt into (user-agents, [(allow|disallow, path)]) groups."""
out, agents, rules, last = [], [], [], None
for raw in robots.splitlines():
line = raw.split("#", 1)[0].strip()
if ":" not in line:
continue
key, val = (p.strip() for p in line.split(":", 1))
key = key.lower()
if key == "user-agent":
if last == "rule":
out.append((agents, rules))
agents, rules = [], []
agents.append(val.lower())
last = "agent"
elif key in ("allow", "disallow") and agents:
rules.append((key, val))
last = "rule"
if agents:
out.append((agents, rules))
return out
def rule_matches(pattern: str, path: str) -> bool:
regex = re.escape(pattern).replace(r"\*", ".*")
if regex.endswith(r"\$"):
regex = regex[:-2] + "$"
return re.match(regex, path) is not None
def allowed(robots: str, bot: str, path: str) -> bool:
"""RFC 9309: rules of every group naming the bot (else '*'); longest match wins, allow wins ties."""
gs = groups(robots)
rules = [r for a, rs in gs if bot.lower() in a for r in rs]
if not any(bot.lower() in a for a, _ in gs):
rules = [r for a, rs in gs if "*" in a for r in rs]
best = None
for kind, pat in rules:
if pat == "" or not rule_matches(pat, path):
continue
key = (len(pat), kind == "allow")
if best is None or key > best[0]:
best = (key, kind)
return best is None or best[1] == "allow"
def text_stats(page: str) -> tuple[int, int]:
body = re.sub(r"(?is)<(script|style|noscript|svg|template)\b.*?</\1>", " ", page)
words = len(html.unescape(re.sub(r"(?s)<[^>]+>", " ", body)).split())
return words, len(re.findall(r"(?i)<pre\b", body))
def check(url: str) -> dict:
parts = urlsplit(url)
origin = f"{parts.scheme}://{parts.netloc}"
path = parts.path or "/"
rstatus, robots = fetch(origin + "/robots.txt", BROWSER_UA)
robots = robots if rstatus == 200 else ""
named = {agent for agents, _ in groups(robots) for agent in agents}
bstatus, page = fetch(url, BROWSER_UA)
cstatus, _ = fetch(url, CLAUDE_UA, limit=65_536)
lstatus, llms = fetch(origin + "/llms.txt", BROWSER_UA, limit=65_536)
words, pres = text_stats(page)
return {
"url": url,
**{b: allowed(robots, b, path) for b in BOTS},
"names_anthropic_bot": sorted(n for n in named if "claude" in n or "anthropic" in n),
"browser_status": bstatus,
"claude_ua_status": cstatus,
"raw_words": words,
"code_blocks": pres,
"llms_txt": lstatus == 200 and not llms.lstrip().lower().startswith(("<!doctype", "<html")),
}
def self_test() -> None:
r = "User-agent: *\nDisallow: /\n\nUser-agent: Claude-SearchBot\nAllow: /docs/\nDisallow: /docs/private\n"
assert allowed(r, "Claude-SearchBot", "/docs/a") and not allowed(r, "Claude-SearchBot", "/docs/private/x")
assert not allowed(r, "ClaudeBot", "/docs/a") and allowed("", "ClaudeBot", "/")
assert allowed("User-agent: *\nDisallow: /a\nAllow: /a\n", "x", "/a") # allow wins a tie
if __name__ == "__main__":
self_test()
urls = sys.argv[1:] or ["https://bugviso.com/"]
with ThreadPoolExecutor(8) as pool:
for row in pool.map(check, urls):
print(json.dumps(row))Three real lines from our run on 2026-12-05:
{"url": "https://docs.stripe.com/api", "ClaudeBot": true, "Claude-SearchBot": true, "Claude-User": true, "names_anthropic_bot": [], "browser_status": 200, "claude_ua_status": 200, "raw_words": 1479, "code_blocks": 2, "llms_txt": true}
{"url": "https://learn.microsoft.com/en-us/docs/", "ClaudeBot": true, "Claude-SearchBot": true, "Claude-User": true, "names_anthropic_bot": [], "browser_status": 200, "claude_ua_status": 403, "raw_words": 383, "code_blocks": 0, "llms_txt": false}
{"url": "https://developer.apple.com/documentation/", "ClaudeBot": true, "Claude-SearchBot": true, "Claude-User": true, "names_anthropic_bot": [], "browser_status": 200, "claude_ua_status": 200, "raw_words": 5, "code_blocks": 0, "llms_txt": false}Read each line in order. Any false among the three bots is a robots.txt problem. A claude_ua_status that differs from browser_status points at the firewall. A raw_words figure far below what the page shows in a browser means the content needs JavaScript.
The script has limits. It checks the one URL you give it, not the whole site. It sends a spoofed user agent from your own IP, so a firewall that verifies Anthropic's IP ranges may block it and still let the real bot in. It also treats any <pre> as a code block.
How BugViso Checks Claude's Access to Your Docs
BugViso's AI search readiness check runs these tests across every page it crawls, not one URL at a time. It reads robots.txt with RFC 9309 longest-match rules for ClaudeBot, Claude-SearchBot and Claude-User, plus the retired anthropic-ai and Claude-Web tokens, and reports each one with its purpose (training or search).
It also requests the site with real AI crawler user agents, ClaudeBot among them, and flags a 403, 401, 429 or challenge response as an edge block. For content, it compares the words in the raw HTML with the words in the rendered page and flags pages where most of the text only appears after JavaScript runs. Those findings feed a 0 to 100 GEO citability score, with the fixes listed in the report and the PDF.
FAQ
Is ClaudeBot the crawler that cites my site in Claude?
No. Anthropic describes ClaudeBot as collecting content for model training. Claude-SearchBot indexes pages for Claude's search results, and Claude-User fetches pages when a user's question needs them. Those two decide whether Claude can read your docs while answering.
Should I block ClaudeBot?
That is a licensing choice, not a visibility one. Blocking ClaudeBot keeps your future pages out of Anthropic's training data. On Anthropic's description, it doesn't remove you from Claude's search answers, as long as Claude-SearchBot and Claude-User stay allowed.
Do I still need rules for anthropic-ai or Claude-Web?
No. Anthropic's crawler page lists only ClaudeBot, Claude-SearchBot and Claude-User. Old rules for the retired tokens do no harm, but don't rely on them to control any current bot.
Do Anthropic's crawlers run JavaScript?
Anthropic doesn't say. Vercel's analysis of AI crawler traffic found ClaudeBot fetching JavaScript files without running them. Serve documentation as static or server-rendered HTML, and check with curl that a body sentence appears in the raw response.
Does an llms.txt file help Claude cite my docs?
Nothing published says so. Anthropic's crawler page doesn't mention it, and half the docs sites we checked have one. It is cheap to add, but crawler access and readable HTML come first.
How do I know if Claude-SearchBot is really visiting?
Check your server or CDN logs for the Claude-SearchBot and Claude-User tokens, and match the source IPs against the ranges Anthropic publishes at claude.com/crawling/bots.json. A request with the token from another IP is not Anthropic.
The Short Version
Robots.txt was fine on 39 of the 40 docs sites we checked. The gaps were a firewall rule and a page with no text before JavaScript. Allow Claude-SearchBot and Claude-User, make the call on ClaudeBot as a training decision, and test each docs page with a Claude user agent and a raw-HTML fetch. To run those checks across a whole docs site at once, use BugViso's AI search readiness check.
Written by
Kazi Khalid Hasan Tamim · BugViso Team
Kazi writes BugViso’s guides on website audits, Core Web Vitals, technical SEO, accessibility and AI search. The data in them comes from audits BugViso runs in a real Chromium browser, including our 219-site study of website health.
Summarise with AI
Open this guide in your assistant.
Follow BugViso
New guides and audit data as we publish them.
AI visibility tracker
Is your brand in AI answers?
See how often AI assistants mention you, cite your site and rank you against your competitors.
- ChatGPT
- Gemini
- Perplexity
- Claude
- AI Overviews
See where your site stands
Run a free BugViso audit for SEO, speed, accessibility and AI search readiness — with fixes you can ship today.