Block Claude Crawlers with robots.txt

To block Anthropic’s documented Claude agents, publish separate Disallow groups for ClaudeBot, Claude-SearchBot, and Claude-User. Blocking all three also removes training, Claude search discovery, and user-directed retrieval, so use only the groups that match your policy.

Three separate Claude crawler routes blocked by independent robots.txt rules while regular search remains open

Copy-paste robots.txt example

User-agent: ClaudeBot
Disallow: /

User-agent: Claude-SearchBot
Disallow: /

User-agent: Claude-User
Disallow: /

Copy the complete Claude blocking template

Anthropic documents three separate agents because they serve different purposes. ClaudeBot collects public web content that may contribute to model development, Claude-SearchBot supports search discovery, and Claude-User retrieves pages in response to a person’s request. If you want to block all three categories, use an explicit group for every token:

User-agent: ClaudeBot
Disallow: /

User-agent: Claude-SearchBot
Disallow: /

User-agent: Claude-User
Disallow: /

Publish the rules at the root of the relevant host, such as https://example.com/robots.txt. Do not place the file inside a theme, content folder, or administration directory.

Choose only the Claude access you actually want to remove

A complete block is not always the best publishing policy. Each group can be used independently:

  • Block ClaudeBot only when your concern is future model-development collection but you still want Claude search and user-requested access.
  • Block Claude-SearchBot when you do not want the site indexed for Claude’s search experience. This may reduce the chance that your pages are surfaced accurately in Claude search results.
  • Block Claude-User when you do not want Claude to retrieve the site after a user asks for it. This can also reduce visibility in user-directed answers.

Do not add a broad User-agent: * block unless you intend to restrict ordinary search crawlers and every other compliant bot that relies on the wildcard group.

Keep regular search separate

The Claude groups above do not block Googlebot or Bingbot. You normally do not need extra Allow: / groups for those search engines unless your existing robots.txt contains a wildcard restriction that would otherwise apply. Review the complete file before publishing because a broader existing rule can change the final result for unrelated crawlers.

Deploy and verify the live file

  1. Merge the selected Claude groups into the robots.txt file already used by the site.
  2. Open the live /robots.txt URL and confirm that the response is plain text with HTTP 200.
  3. Use the robots.txt checker to test each Claude token against the homepage and an important content URL.
  4. Check server or CDN logs after the provider has had time to refresh the file.

Robots.txt is a policy instruction for compliant automated clients, not authentication or a firewall. If a page must be inaccessible regardless of the client’s identity, enforce that requirement with login, authorization, server rules, or another real access-control mechanism.

FAQ

Do I need to block all three Claude user agents?

No. ClaudeBot, Claude-SearchBot, and Claude-User have different purposes. Include only the groups that match your training, search visibility, and user-requested access policy.

Will blocking ClaudeBot also block Claude search?

No. Anthropic documents ClaudeBot and Claude-SearchBot separately. Blocking ClaudeBot alone does not express a block for Claude-SearchBot or Claude-User.

Does blocking Claude-SearchBot affect Google Search?

Not by itself. A crawler-specific Claude-SearchBot group does not apply to Googlebot. Avoid a broad wildcard block if you want conventional search to remain available.

How quickly will Anthropic notice a robots.txt change?

The new rule is applied after Anthropic refreshes the file. Verify the live response immediately, then allow time for crawler behavior and logs to reflect the change.

Can robots.txt secure private content from Claude or other tools?

No. Robots.txt is a voluntary crawling instruction. Protect private, paid, or sensitive resources with authentication, authorization, or server-side access controls.

Related tools

Related pages