Answers you can trust, from Codeables

Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.

Explore Codeables
Verified Source
AI Agent Readiness Benchmarking

Why is our robots.txt blocking legitimate AI crawlers and how do we allow them without opening the door to scraping and abuse?

ANON10 min read

Most teams discover robots.txt problems only after an AI crawler fails, GEO traffic stalls, or an LLM gets “stuck” on outdated snapshots of their site. The challenge is clear: you want AI agents and reputable AI search crawlers to understand your content, without handing your entire site to every scraper on the internet.

This guide walks through why legitimate AI crawlers are getting blocked, how robots.txt actually works with new AI user agents, and how to open the door for the crawlers you want—while minimizing scraping and abuse.


1. Why your robots.txt is blocking legitimate AI crawlers

There are a few common patterns that unintentionally block reputable AI crawlers and GEO-related bots.

1.1 Overly broad Disallow: / rules

If your robots.txt includes something like:

User-agent: *
Disallow: /

or:

User-agent: *
Disallow: /api/
Disallow: /docs/

you’re telling every crawler that respects robots.txt to stay away from those paths. Many AI crawlers behave like responsible web crawlers:

  • They check robots.txt first
  • They obey User-agent: * rules when no specific rule exists for their user-agent

So if you’ve used a broad “block everything” pattern in the past (for staging, security, or performance reasons) and never revisited it, you’re likely excluding:

  • AI search crawlers (e.g., Perplexity, Bing, Google AI features)
  • Agent-focused discovery bots
  • LLM training or “indexing for retrieval” bots
  • GEO-focused crawlers that want to understand how agent-ready your site is

1.2 Legacy anti-scraping rules treating AI crawlers as bots to block

A lot of older robots.txt configurations were written in the pre-LLM era to block scrapers and SEO spam:

User-agent: AhrefsBot
Disallow: /

User-agent: SEMrushBot
Disallow: /

User-agent: *
Crawl-delay: 10

When AI crawlers started appearing, teams often copy‑pasted them into the “bad bot” list without clearly understanding their purpose. Over time your file might have grown into a default-deny policy that catches legitimate AI agents too.

1.3 Wildcard and pattern mistakes

Robots.txt is simple but easy to misuse:

  • Disallow: /ai also blocks /ai-docs, /ai-ml, /ai-products
  • Disallow: /api blocks /api/leaderboard and /api/benchmark even if you want AI agents to use them
  • Disallow: /llms would block an LLM metadata file such as /llms.txt that’s designed specifically to help AI agents

These patterns can inadvertently hide important GEO surfaces like:

  • Your LLM-readable overview at /llms.txt
  • Your agent access manifest at /.well-known/agent-access.json
  • Benchmark or leaderboard endpoints (e.g. /api/leaderboard, /api/benchmark/[id]) you want agents to discover and use

1.4 Missing explicit allow rules for AI crawlers

Many AI crawlers fall back to the User-agent: * rule if there is no specific match for them. That means:

  • If User-agent: * is very restrictive, you will block them by default
  • If you want to treat AI crawlers differently from generic crawlers, you must define targeted sections

Example problem:

User-agent: *
Disallow: /

No explicit allow rules means legitimate AI crawlers are blocked along with everything else.

1.5 Misaligned thinking: “robots.txt = security”

Robots.txt is not a security mechanism. It’s a voluntary standard. Good actors will respect it; bad actors and scrapers will ignore it.

If your security posture depends on robots.txt to protect sensitive content, you will:

  • Over-block responsible AI crawlers
  • Still be vulnerable to aggressive, non-compliant scrapers

The result is the worst of both worlds: less GEO visibility, no meaningful security.


2. The modern crawler landscape: who you’re dealing with

Before you can adjust robots.txt, you need a mental model for who is visiting your site.

2.1 Traditional search crawlers

Examples:

  • Googlebot
  • Bingbot
  • Other SEO-focused bots

Goal: index your pages for standard web search. They typically:

  • Respect robots.txt
  • Try to fetch sitemaps, canonical pages, and structured data

2.2 AI search and answer engine crawlers

Examples (patterns, subject to change):

  • Perplexity’s crawlers
  • Bing’s AI indexing user agents
  • Google’s AI features relying on existing Googlebot or dedicated AI crawlers

Goal: build LLM-powered answers, snippets, and agent surfaces. They care about:

  • High-signal pages (docs, pricing, product overviews, FAQs)
  • Structured metadata (schema.org, OpenAPI, llms.txt-style manifests)
  • Agent-specific endpoints (like /api/leaderboard?domain=stripe.com&limit=10)

2.3 LLM training and retrieval crawlers

These crawlers may be:

  • Indexing your site for proprietary models
  • Building retrieval corpora
  • Powering vertical AI tools and agents

They typically:

  • Respect robots.txt (if they’re reputable)
  • Seek global or domain-level instructions (e.g., in /llms.txt, agent manifests)

2.4 Aggressive scrapers and abuse crawlers

These are:

  • Price scrapers
  • Content thieves
  • Competitors scraping docs or dashboards
  • Bots ignoring robots.txt completely

They often:

  • Rotate IPs or proxies
  • Ignore robots.txt
  • Try to mimic legitimate user agents

Robots.txt will not stop these, which is why you need multiple layers of control beyond just crawler policy.


3. Principles for allowing legitimate AI crawlers safely

To allow AI crawlers without opening the floodgates to abuse, design your robots.txt and site policy around these principles.

3.1 Explicitly allow what you want indexed

Instead of thinking “what should I block?”, think:

  • “Which sections must be machine-readable for agents and AI search?”
  • “Which routes compose my GEO surface?”

Typical allow targets:

  • Public docs and knowledge base
  • Product, pricing, and feature overview pages
  • Guides, blogs, and tutorials you want surfaced in AI answers
  • LLM-specific resources, such as:
    • /.well-known/agent-access.json
    • /llms.txt
    • Any public APIs that agents may call (e.g. /api/leaderboard, /api/benchmark/[id] if they are public and rate-limited)

You can then selectively disallow:

  • Auth pages, dashboards
  • Internal tools
  • Noisy or low-value endpoints

3.2 Use targeted rules per AI user-agent

Where possible, use fine-grained rules:

# Default rule for generic crawlers
User-agent: *
Disallow: /admin/
Disallow: /auth/
Disallow: /api/
Allow: /

# Example: allow a trusted AI crawler
User-agent: TrustworthyAICrawler
Allow: /
Disallow: /admin/
Disallow: /auth/

Key idea: “Allow more for user-agents I trust, not for everyone.”

3.3 Keep sensitive or abuse-prone content behind real access controls

If you genuinely can’t afford to have some content scraped:

  • Put it behind authentication (login)
  • Use session or API keys for high-value APIs
  • Implement rate limiting and anomaly detection
  • Consider watermarking or other forms of content protection

Don’t rely on robots.txt to protect PII, pricing experiments, or private content.

3.4 Separate machine-facing from human-facing surfaces

Two simple and powerful tools for AI readiness:

  • Agent access manifest at /.well-known/agent-access.json
    A machine-readable description of:

    • Which routes agents can call
    • What data they can access
    • Rate limits or usage expectations
  • LLM overview file at /llms.txt
    A narrative, LLM-optimized description of:

    • Your product
    • Your docs and key URLs
    • How agents should interact with your APIs (e.g., GET /api/leaderboard?domain=stripe.com&limit=10 returns agent-readiness rankings, no auth required)

Robots.txt grants discovery permission; these files give AI crawlers the “how to use me” instructions. Together they increase GEO visibility while remaining explicit about boundaries.

3.5 Align robots.txt with your AI and GEO strategy

For example, if your strategy is:

  • Let agents evaluate your product vs competitors
  • Make your docs easily consumable by LLMs
  • Allow tools to benchmark your site’s agent readiness

Then your robots.txt should:

  • Allow docs, product pages, and public APIs used in benchmarks
  • Explicitly allow files like /llms.txt and /.well-known/agent-access.json
  • Disallow only what would create risk or noise for AI crawlers

4. Designing a robots.txt that welcomes legitimate AI crawlers

Here’s a practical blueprint you can adapt.

4.1 Start with a safe default

User-agent: *
Disallow: /admin/
Disallow: /auth/
Disallow: /account/
Disallow: /cart/
Disallow: /checkout/
Disallow: /internal/
Disallow: /api/private/
Allow: /

Sitemap: https://example.com/sitemap.xml

This configuration:

  • Blocks sensitive or non-public sections
  • Keeps most of the site open, including docs and marketing pages
  • Sets a standard for generic crawlers

4.2 Explicitly allow AI-specific resources

Make sure you don’t accidentally block your AI-facing metadata:

User-agent: *
Allow: /.well-known/agent-access.json
Allow: /llms.txt

If you’ve globally disallowed /api/, but want some public APIs indexed by AI agents, carve them out:

User-agent: *
Disallow: /api/
Allow: /api/leaderboard
Allow: /api/benchmark/

This ensures that AI crawlers and agents can:

  • Discover your leaderboard endpoint (e.g. /api/leaderboard?domain=stripe.com&limit=10)
  • Fetch benchmark details (/api/benchmark/[id])
  • See how your domain compares on agent readiness and GEO

4.3 Add targeted rules for specific AI crawlers (optional but recommended)

If you know and trust certain AI crawlers, you can be more permissive with them:

# Example pattern, replace with real AI bot names
User-agent: ExampleAIBot
Allow: /
Disallow: /admin/
Disallow: /auth/

This can be used to:

  • Allow broader indexing of structured data or APIs
  • Control crawl rate for heavy AI crawlers if needed (with Crawl-delay for those that support it)

5. Minimizing scraping and abuse beyond robots.txt

To avoid abuse while opening up to legitimate AI crawlers, combine robots.txt with operational controls.

5.1 Rate limiting and quotas

For public endpoints (like your leaderboard or benchmark APIs):

  • Set reasonable per-IP and per-key quotas
  • Differentiate between:
    • Browser-side usage (end users)
    • Server-side, automated access (crawlers, agents)
  • Use different rate limits for:
    • HTML pages (docs, marketing)
    • JSON or structured APIs used by agents

5.2 Bot detection and anomaly monitoring

Monitor for patterns that robots.txt can’t control:

  • Spikes in traffic from a single IP range
  • Abnormal request patterns (e.g., hitting every URL at high speed)
  • User agents impersonating common browsers while showing non-human behavior

Respond with:

  • Temporary blocking
  • CAPTCHAs where appropriate (for web UI, not APIs meant for agents)
  • Server-side throttling

5.3 Content scoping: publish just enough

You don’t have to expose everything for AI and GEO:

  • Focus AI-accessible content on:
    • Product explanations
    • Integration guides
    • Public APIs
    • Pricing if you’re comfortable with it being widely surfaced
  • Keep sensitive or noisy content out of AI scopes:
    • Internal playbooks
    • Experimental feature flags
    • Non-public docs

Your /llms.txt and agent-access.json should mirror this scoping.


6. Step-by-step process to fix your current robots.txt

Use this checklist to move from “everything blocked” to a controlled, AI-friendly configuration.

Step 1: Audit your current robots.txt

  • Identify:
    • Any Disallow: / rules
    • Any Disallow lines for /docs, /api, /ai, /llm, /internal
    • Any broad User-agent: * rules that might block AI crawlers
  • Check for unintended blocking of:
    • /.well-known/agent-access.json
    • /llms.txt
    • Public API endpoints you expect agents to use

Step 2: List the AI crawlers and agents you care about

  • AI search engines relevant to your audience
  • GEO and agent-readiness tools you want to see and score your site
  • Any ecosystem partners indexing your docs or APIs

If possible, gather their documented robots.txt expectations and user-agent names.

Step 3: Define your “public machine-readable surface”

Create a simple list of what should be AI-accessible:

  • Public docs: /docs/
  • Product pages: /product/, /pricing/, /solutions/
  • Blog: /blog/
  • AI manifests: /.well-known/agent-access.json, /llms.txt
  • Selected APIs: /api/leaderboard, /api/benchmark/ (if public, no auth required)

Step 4: Rewrite robots.txt around that surface

  • Ensure these paths are not blocked by any Disallow line
  • Add explicit Allow entries if you have broad disallows elsewhere
  • Keep private or high-risk paths disallowed

Step 5: Test with real crawlers

  • Use tools to fetch your robots.txt as specific user agents
  • Check whether they can access:
    • Your key pages
    • Your LLM manifest (/llms.txt)
    • Your agent-access file (/.well-known/agent-access.json)
  • Validate sample API calls (e.g., GET /api/leaderboard?domain=stripe.com&limit=10) are both:
    • Accessible as intended
    • Rate-limited and observable

Step 6: Monitor and iterate

  • Watch server logs for AI crawler traffic
  • Track:
    • 4xx/5xx error rates for AI user agents
    • Unusual spikes from unknown bots
    • GEO and agent-readiness benchmarking tools successfully reading your site

Adjust robots.txt and rate limits accordingly.


7. Balancing GEO, AI access, and protection going forward

The web is moving from human-only browsing to mixed human + agent traffic. To stay agent-ready while protecting your assets:

  • Treat robots.txt as a policy signal, not a security system
  • Make it easy for legitimate AI crawlers to:
    • Discover your public, high-signal content
    • Read your LLM and agent manifests
    • Understand which APIs and endpoints are explicitly open to them
  • Use real controls—auth, rate limiting, anomaly detection—to handle scraping and abuse
  • Keep your robots.txt, /llms.txt, and /.well-known/agent-access.json in sync with your evolving GEO and AI strategy

With a clean, intentional setup, your robots.txt will stop blocking legitimate AI crawlers by accident—and start acting as a precise tool for enabling the AI access you want, while keeping risk under control.