agentspeed.
← all fixes
Issue remediation

ClaudeBot is blocked by your robots.txt

Anthropic's crawler is disallowed, so Claude cannot read your pages or cite them in answers.

failed checkrobots_txt.allows_known_agents
What this means

ClaudeBot is the user-agent Anthropic uses to fetch pages on behalf of Claude (the Anthropic API and the Claude.ai chat product). When robots.txt contains "User-agent: ClaudeBot" followed by "Disallow: /", every Claude request for your content gets refused at the robots.txt layer, and no HTML is ever fetched.

Why it matters for AI agents

Claude is one of the most-used assistants for technical, research, and long-context work, exactly the kinds of queries where citing your docs, your blog, or your product pages compounds in value. Anthropic respects robots.txt strictly, so a single Disallow line takes you out of the answer set. Unlike search engines, there is no fallback: when ClaudeBot can't fetch, Claude doesn't show your content at all. There is no "submit URL" path that bypasses robots.

Business impact

If a developer asks Claude 'what's the best Postgres-on-Kubernetes operator' and you've blocked ClaudeBot, your product is not in the comparison. Your competitor is. Unblocking is a one-line change and has no SEO impact (Google uses Googlebot, not ClaudeBot). Sites that unblock typically see Anthropic-referred traffic appear in their analytics within 1–2 weeks as the index refreshes.

How to check manually

Open https://your-domain.com/robots.txt and search for "ClaudeBot" (case-sensitive). If you see "User-agent: ClaudeBot" followed by "Disallow: /" (or a global "User-agent: *" with "Disallow: /" and no ClaudeBot allow rule above it), Claude is blocked. Note: there are two Anthropic user-agents to consider, ClaudeBot (training and indexing) and Claude-User (on-demand fetches when a Claude user pastes a URL). Most sites want to allow both.

The exact fix

Remove any "User-agent: ClaudeBot" + "Disallow: /" stanza. If you have a wildcard disallow you want to keep, add a specific "User-agent: ClaudeBot" + "Allow: /" block above the wildcard so the more-specific rule wins. Add the same block for Claude-User. While you are editing, also confirm GPTBot, OAI-SearchBot, ChatGPT-User, PerplexityBot, and Google-Extended are allowed, since the same robots.txt failure pattern affects all of them.

Copy-paste snippet
Reference snippettxtrobots.txt
# Allow Anthropic crawlers and other major AI agents.
User-agent: ClaudeBot
Allow: /
Disallow: /admin/
Disallow: /api/

User-agent: Claude-User
Allow: /

User-agent: GPTBot
Allow: /

User-agent: OAI-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: Google-Extended
Allow: /

# Default for everyone else.
User-agent: *
Allow: /
Disallow: /admin/

Sitemap: https://your-domain.com/sitemap.xml
Platform-specific implementations

The reference snippet above is platform-agnostic. Below are the concrete steps for the four most common stacks plus a generic fallback for any other host.

Next.js

Use the Next.js MetadataRoute.Robots API at app/robots.ts. Express the AI-agent allowlist as an array, then map over it to produce one rule per agent. Next serves the result at /robots.txt automatically. The same file pattern handles GPTBot, ClaudeBot, and any future agents; add to the array and redeploy.

Next.jstsapp/robots.ts
import type { MetadataRoute } from 'next';

const AI_AGENTS = [
  'ClaudeBot',
  'Claude-User',
  'GPTBot',
  'OAI-SearchBot',
  'ChatGPT-User',
  'PerplexityBot',
  'Google-Extended',
] as const;

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      ...AI_AGENTS.map((userAgent) => ({
        userAgent,
        allow: '/',
        disallow: ['/admin/', '/api/'],
      })),
      { userAgent: '*', allow: '/', disallow: ['/admin/'] },
    ],
    sitemap: 'https://your-domain.com/sitemap.xml',
  };
}

WordPress

Hook into the robots_txt filter from your theme's functions.php (or a code-snippets plugin). The hook receives the existing robots.txt string; prepend your AI-agent allowlist before WordPress's default block.

WordPressphpfunctions.php
add_filter( 'robots_txt', function ( $output ) {
  $agents = [
    'ClaudeBot', 'Claude-User',
    'GPTBot', 'OAI-SearchBot', 'ChatGPT-User',
    'PerplexityBot', 'Google-Extended',
  ];
  $rules = '';
  foreach ( $agents as $agent ) {
    $rules .= "User-agent: {$agent}\nAllow: /\nDisallow: /wp-admin/\n\n";
  }
  return $rules . $output;
}, 10, 1 );

Shopify

Edit robots.txt.liquid. Open Online Store → Themes → Edit code → Templates → Add a new template called robots.txt.liquid. Inject AI-agent allow rules above the default block so the more-specific rules win in the spec's longest-match resolution.

Shopifyliquidtemplates/robots.txt.liquid
# AI agents
{%- assign ai_agents = "ClaudeBot,Claude-User,GPTBot,OAI-SearchBot,ChatGPT-User,PerplexityBot,Google-Extended" | split: "," -%}
{%- for agent in ai_agents -%}
User-agent: {{ agent }}
Allow: /
Disallow: /admin/

{% endfor -%}

{%- for group in robots.default_groups -%}
{{- group.user_agent }}
{%- for rule in group.rules -%}
{{ rule }}
{% endfor -%}
{%- if group.sitemap -%}
{{ group.sitemap }}
{%- endif -%}
{%- endfor -%}

Webflow

Webflow lets you edit robots.txt directly under Site settings → SEO → Robots.txt. Paste the AI-agent allowlist there. Webflow regenerates robots.txt on publish; the change is live as soon as the next publish completes.

WebflowtxtSite settings → SEO → Robots.txt
User-agent: ClaudeBot
Allow: /

User-agent: Claude-User
Allow: /

User-agent: GPTBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: *
Allow: /

Sitemap: https://your-domain.com/sitemap.xml

Static HTML / any stack

Place a robots.txt file at the root of your site, next to index.html. Every static host (Netlify, Vercel, GitHub Pages, S3, Cloudflare Pages) serves it as text/plain by default. After deploy, fetch it directly to confirm the content is what you intended.

Static HTML / any stacktxtpublic/robots.txt
User-agent: ClaudeBot
Allow: /

User-agent: Claude-User
Allow: /

User-agent: GPTBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: *
Allow: /

Sitemap: https://your-domain.com/sitemap.xml
Common mistakes
How to re-test

After publishing, fetch https://your-domain.com/robots.txt and confirm ClaudeBot has an Allow rule. Then run a fresh AgentSpeed scan, and the "robots.txt allows known agents" check should pass within seconds. Anthropic-referred traffic begins appearing in analytics 1–2 weeks later as the index refreshes.

FAQ
Does allowing ClaudeBot let Anthropic train on my content?

ClaudeBot fetches both for retrieval (so Claude can cite you) and to inform model training. If you want citations but not training, Anthropic publishes opt-out signals, but the cleaner separation is to allow Claude-User (on-demand fetch) and disallow ClaudeBot (training-and-indexing). For most sites the trade-off favours allowing both.

Will allowing ClaudeBot affect my Google rankings?

No. Googlebot is a separate user-agent. ClaudeBot rules only affect Anthropic; SEO is unchanged.

How is this different from the GPTBot fix?

Mechanically identical: both are robots.txt user-agent rules. The two crawlers are independent: blocking GPTBot does not block ClaudeBot, and vice versa. Most sites benefit from allowing both alongside PerplexityBot and Google-Extended.

Verify on your site
Run a scan

Free scan, no signup. The score page is permanent and citable, so you can link it from your team's remediation ticket alongside this guide for “ClaudeBot is blocked by your robots.txt”.

Run a free scan →See all fixes →