Allow AI crawlers in robots

AI assistants fetch pages with their own user agents: GPTBot and OAI-SearchBot from OpenAI, ClaudeBot from Anthropic, PerplexityBot, and Google-Extended for Gemini. Decide per bot between training and retrieval, write explicit groups, and test with curl using each agent string.

mediumIn codeimpact effort

Why this matters

A blanket disallow blocks every assistant by inheritance.

Get the full breakdown

The extended brief explains when this works, when it does not, and the trade-offs. Join the waitlist and it unlocks for every tip when sign-in opens; MCP access is the paid part.

Join the waitlist

Before you start

  • Control of robots.txt
  • A decision on training versus retrieval

How to apply it

  1. Check the inherited policy

    Read the User-agent: * group. If it contains Disallow: /, every AI crawler is blocked regardless of named groups you add later.

    Check: The star group contains no site-wide disallow rule.

  2. Write explicit groups per bot General best practice

    Add separate groups for GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot and Google-Extended with Allow rules for content and rendering assets.

    Check: robots.txt contains a named group for each bot with no site-wide disallow.

  3. Test each agent string General best practice

    Request a key page with curl using each user agent and confirm a 200 response with full HTML.

    Check: curl -A "OAI-SearchBot" your production domain/ returns 200 and the page HTML.

Get the prompt for your agent

A ready-to-paste prompt for your agent that implements this tip and verifies the result in your repo.

Join the waitlist

Source: seo-mcp playbook · curated entry · report an error

Framework notes

nextjs-app

`app/robots.ts` `rules` accepts an array of `{ userAgent, allow, disallow }`, which lets you emit one group per AI bot.

shopify

Shopify generates robots.txt; edit the `robots.txt.liquid` template in the theme to add named user-agent groups.

Official references

Let your agent apply this + 161 more tips.

Pre-order — $19