robots.txt for AI crawlers: publish a file that returns 200
Publish a plain-text file at https://your-domain/robots.txt that returns HTTP 200, names the AI bots you allow or block, and ends with a Sitemap: line. A missing file (404) means crawlers assume everything is allowed; a server error (5xx) means compliant crawlers assume everything is blocked.
Why it matters
robots.txt is the first file a compliant crawler requests on your domain. OpenAI (OAI-SearchBot, GPTBot), Anthropic (ClaudeBot, Claude-SearchBot) and Perplexity (PerplexityBot) all document robots.txt as the way to control their crawlers, and each one reads its own User-agent group.
The status code matters as much as the content. Under RFC 9309, a 4xx response lets crawlers fetch any URL, while a 5xx response means the file is unreachable and crawlers should treat the whole site as disallowed. A store whose robots.txt times out or errors can disappear from AI answers without anyone touching the rules.
robots.txt is a request, not a lock. Google states that robots.txt instructions cannot enforce crawler behavior, and it is not a way to keep a page out of search results; use noindex for that. Its job is to tell well-behaved bots where they may go.
We pass this check when /robots.txt returns 200, mark it Needs work on 404 or 410 (crawlers fall back to allow-all, but you have stated nothing), and fail it on any other status, including 403 from a firewall and 5xx.
How to fix it
Check what your server returns today
Request the file with a plain HTTP client and look at the status line, not just the body. Some hosts return a 200 HTML error page or a 403 from a bot firewall.
shellcurl -sI https://your-domain.com/robots.txt # Expect: HTTP/2 200 and content-type: text/plainWrite explicit groups for the bots you care about
Start from an allow-all baseline, add one group per AI bot whose access you want to state, and keep private paths (cart, checkout, account) disallowed for everyone. A crawler that finds a group with its own name ignores the
*group, so repeat sharedDisallowlines inside each named group.textUser-agent: * Disallow: /cart Disallow: /checkout Disallow: /account User-agent: OAI-SearchBot User-agent: ChatGPT-User User-agent: Claude-SearchBot User-agent: Claude-User User-agent: PerplexityBot User-agent: Perplexity-User Disallow: /cart Disallow: /checkout Disallow: /account Sitemap: https://your-domain.com/sitemap.xmlServe it from the root of every host
The file must live at
/robots.txton each protocol and host combination.www.your-domain.comandshop.your-domain.comeach need their own file; a robots.txt in a subfolder is ignored.Use your platform’s supported method to edit it
On Shopify, add a
robots.txt.liquidtemplate to your theme; it replaces the default file Shopify generates. WordPress serves a virtual robots.txt until you upload a physical file or use your SEO plugin’s editor. On other platforms, look in the theme or SEO settings, or ask your host to serve a static file.Keep it small and plain
Serve UTF-8 plain text. RFC 9309 only requires crawlers to parse the first 500 KiB, and we stop reading at the same size, so rules after that point may be ignored.
How to verify
Run the free check at citeto.com/check; the robots.txt item shows the HTTP status we received.
Run
curl -sI https://your-domain.com/robots.txtand confirm200andtext/plain. Then open the URL in a browser to confirm the body is your rules, not an HTML page.Changes are not instant: OpenAI notes that robots.txt updates can take about 24 hours to affect search, and RFC 9309 lets crawlers cache the file for up to 24 hours.
Common pitfalls
A bot firewall or CDN rule that answers
/robots.txtwith 403 or a challenge page. Crawlers never see your rules, and we fail the check.Adding a named group for one bot and forgetting that it no longer inherits the
*group, so the bot can now crawl your checkout or is missing an allow you intended.Using
Disallowto hide a page from search. A blocked URL can still be listed if other pages link to it; usenoindexand leave the page crawlable.Leaving a staging rule (
User-agent: */Disallow: /) in place after launch.
FAQ
Technically no: a 404 means crawlers may fetch anything. In practice a 200 file lets you declare your sitemap and state your AI bot policy explicitly, which is why we rate a missing file as Needs work rather than Passed.
The file name must be lowercase robots.txt. Field names like User-agent are not case-sensitive, but path values in Allow and Disallow are.
Only bots that choose to follow it. OpenAI, Anthropic, Google, Perplexity and Common Crawl document that their crawlers honor it, but user-triggered fetchers such as ChatGPT-User and Perplexity-User are documented as not always applying robots.txt rules.