# robots.txt

> robots.txt is a plain text file at the root of a website that tells crawlers, including AI bots, which URLs they may and may not fetch. It is a request, not access control.

Source: https://domyaeo.com/glossary/robots-txt
Updated: 2026-11-19
Publisher: Do My AEO (https://domyaeo.com)

robots.txt is a text file at `yourdomain.com/robots.txt` that lists which parts of a site each crawler may fetch. Rules are grouped by user-agent name, so you can treat Googlebot, GPTBot and OAI-SearchBot differently. Well-behaved crawlers read it before crawling, but it is a request: it does not lock anything, and it does not by itself keep a page out of search results.

The format is standardized as [RFC 9309, the Robots Exclusion Protocol](https://www.rfc-editor.org/rfc/rfc9309) (September 2022). Key points from the standard:

- The file must be named `/robots.txt`, all lowercase, at the top level of the host.
- "These rules are not a form of access authorization."
- When Allow and Disallow rules conflict, "The most specific match found MUST be used."
- Crawlers "SHOULD NOT use the cached version for more than 24 hours."
- If the file returns a server error (5xx), "the crawler MUST assume complete disallow." A 4xx means the crawler may fetch anything.

## Example

A common setup for a business that wants to appear in AI answers but opt out of model training:

```text
# Search and AI answer bots: allowed
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
Allow: /

# Model training: opted out
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
User-agent: Google-Extended
Disallow: /

User-agent: *
Allow: /

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

Check the exact bot names in our [crawler directory](/crawlers), and see [robots.txt for AI crawlers](/blog/robots-txt-for-ai-crawlers) for more patterns.

## Why it matters for your site

OpenAI's [bot documentation](https://developers.openai.com/api/docs/bots) (checked November 19, 2026) says sites opted out of OAI-SearchBot "will not be shown in ChatGPT search answers," and that changes can take "~24 hours" to take effect in search. One wrong line can remove you from an assistant.

Your CDN may also be editing the file. Cloudflare's [managed robots.txt documentation](https://developers.cloudflare.com/bots/additional-configurations/managed-robots-txt/) (checked November 19, 2026) says it will "prepend our managed robots.txt before your existing robots.txt" when certain AI crawler settings are on. Always open the live file to see what is actually served.

## Common misconceptions

**"Disallow keeps a page out of Google."** Google's [robots.txt introduction](https://developers.google.com/search/docs/crawling-indexing/robots/intro) says robots.txt "is not a mechanism for keeping a web page out of Google" and that a disallowed page "can still be indexed if linked to from other sites." Use `noindex` or a password.

**"Every AI bot obeys it."** User-triggered fetchers such as ChatGPT-User and Perplexity-User say robots.txt may not apply to them.

## Sources

- IETF, [RFC 9309: Robots Exclusion Protocol](https://www.rfc-editor.org/rfc/rfc9309), September 2022
- Google Search Central, [Robots.txt Introduction and Guide](https://developers.google.com/search/docs/crawling-indexing/robots/intro) (checked November 19, 2026)
- OpenAI, [Overview of OpenAI Crawlers](https://developers.openai.com/api/docs/bots) (checked November 19, 2026)
- Cloudflare, [robots.txt setting](https://developers.cloudflare.com/bots/additional-configurations/managed-robots-txt/) (checked November 19, 2026)
