WebmasterID logoWebmasterID
Robots & crawl control

How to block ClaudeBot in robots.txt

If you do not want Anthropic's ClaudeBot fetching your site, you can disallow it in robots.txt. This page gives the exact rule, clarifies that it does not affect the real-time Claude-User fetch, and is honest that robots.txt is honoured by compliant crawlers rather than enforced.

Verified against primary sources

The rule

Add this group to disallow ClaudeBot across the whole site:

User-agent: ClaudeBot Disallow: /

To block only part of the site, list specific paths instead of /, and use Allow to carve out exceptions.

What it does and does not affect

This rule targets only the ClaudeBot token, which Anthropic uses for its web crawler. It does not affect Claude-User, the separate token Anthropic uses when a person asks Claude to fetch a specific page in real time. If you also want to restrict that behaviour, target the Claude-User token in its own group.

The rule has no effect on crawlers from other companies — each is controlled by its own token.

The limits

Anthropic documents that ClaudeBot honours robots.txt, but robots.txt cannot force compliance and a disallow does not retroactively remove content already used. Treat it as a forward-looking request to the compliant crawler.

How it appears in analytics and logs

After adding a ClaudeBot Disallow, compliant ClaudeBot requests to blocked paths should stop. Continued requests claiming to be ClaudeBot warrant verification.

Diagnostic use case

Disallow ClaudeBot site-wide or on specific paths while leaving Claude-User and other crawlers under their own rules.

What WebmasterID can help detect

WebmasterID shows ClaudeBot crawl activity before and after the change, so you can confirm the block took effect for the compliant crawler and flag any client ignoring it.

Common mistakes

Privacy and accuracy notes

Blocking ClaudeBot is a publishing-policy choice. The rule is public in your robots.txt and is not a privacy or security mechanism.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.