agent Anthropic respects robots.txt

Claude-Code

Anthropic uses this crawler to open pages on a user's behalf inside AI tools. Fetches docs/pages requested during Claude Code sessions.

Crawler data last reviewed September 18, 2026 · all 61 crawlers

Claude-Code at a glance

OperatorAnthropic
TypeAI agent browser
Respects robots.txtYes — a Disallow rule is honored
If you allow itAllowing it keeps your site reachable to AI agents acting for users — an emerging traffic channel worth keeping open.
If you block itBlocking it stops agent-driven visits but provides no real content protection, since agents only fetch pages the user asked for.

What is Claude-Code?

Fetches docs/pages requested during Claude Code sessions. Agent crawlers browse the web on a user's behalf inside AI tools: opening pages, reading documentation, and completing tasks. Traffic arrives from engaged users who asked for exactly what you offer. Blocking agents does not protect content from training, but it does cut off this kind of high-intent visit.

Allowing it keeps your site reachable to AI agents acting for users — an emerging traffic channel worth keeping open.

Primary source: Anthropic's official crawler documentation.

Does Claude-Code respect robots.txt?

Yes. Claude-Code honors robots.txt directives, including wildcard rules and Allow lines. A Disallow rule for this crawler is respected — but remember robots.txt is a voluntary protocol across the whole industry, not a wall.

How to block Claude-Code

Add this group to your robots.txt to deny Claude-Code across your whole site:

User-agent: Claude-Code
Disallow: /

Blocking it stops agent-driven visits but provides no real content protection, since agents only fetch pages the user asked for.

How to allow Claude-Code

Claude-Code is allowed by default on every site. It only gets blocked if a matching rule exists — most often a global User-agent: * group with Disallow: /. To exempt it while blocking other bots, put an empty Disallow group for it before the global block:

User-agent: Claude-Code
Disallow:

User-agent: *
Disallow: /

Does blocking Claude-Code hurt your rankings?

No — not for classic search. Claude-Code is not a Google user agent, so a robots.txt rule for it has no effect on Google rankings or indexing. The only thing you give up is what this specific AI agent browser does with your pages, described above.

How to verify Claude-Code is really hitting your site

robots.txt states what a compliant crawler may fetch; your access log shows what actually happened. Search the log for the token:

grep -i "Claude-Code" /var/log/nginx/access.log | tail -50

On Cloudflare the free plan does not expose raw request logs, so use Security Events to see blocked requests, or add a console.log line in a Worker to record the user agent. On Vercel or Netlify, filter the request log by user agent string.

User agents are trivially spoofable, which is why "I saw Claude-Code in my logs" is not proof. Because Claude-Code is documented to honor robots.txt, a request from it that ignores your rules is worth investigating — but a single stray hit is usually a misconfigured tool, not the real crawler.

Should you block Claude-Code?

Is Claude-Code currently allowed on your site?

Paste your robots.txt into the free auditor and see verdicts for all 61 AI crawlers — including the specific paths that matter.

Other AI crawlers from Anthropic

Anthropic runs 6 distinct user agents. They are configured independently in robots.txt, so blocking one does not block the others — a detail that catches people out when they assume a single rule covers a whole vendor.

CrawlerTyperobots.txtWhat it does
ClaudeBotAI trainingyesCrawls content to train Claude models.
Claude-UserAI assistant fetcheryesFetches pages when a Claude user asks about them. Not used for training.
Claude-SearchBotAI searchyesPowers Claude's search citation index.
Claude-WebAI assistant fetcheryesLegacy web-fetch user agent for Claude.
Claude-Code this pageAI agent browseryesFetches docs/pages requested during Claude Code sessions.
anthropic-aiAI trainingyesLegacy training crawler.

Related AI crawlers

Further reading

All 14 GEO guides · Full AI crawler directory