# robots.txt (the file that tells crawlers what to fetch)

> What a robots.txt file is, where it goes, a five-line example, which rule wins, and what the file cannot do: it controls crawling, not indexing or access.

Source: https://central.to/glossary/robots-txt · Updated 2026-11-23 · Published by Central (https://central.to)

**Definition:** robots.txt is a plain text file at the root of a website that tells automated crawlers which URLs they may fetch; its rules are standardized as the Robots Exclusion Protocol in RFC 9309.

Free tool: [AI crawler access checker](https://central.to/tools/ai-crawler-checker). Check whether ChatGPT, Perplexity, Google's AI, Claude and other AI crawlers may read your shop.

## What robots.txt does

Before a crawler fetches pages from a website, it requests one file: `/robots.txt`. The file lists groups of rules. Each group starts with one or more `User-agent` lines that name the crawlers it is for, followed by `Allow` and `Disallow` lines with URL paths. A crawler follows the group that names it. If no group names it, it follows the `*` group, and if there is none, no rules apply.

The method was first defined in 1994. Since September 2022 it is an IETF standards track document, [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309.html), under the name Robots Exclusion Protocol (REP).

## A five-line example

```
User-agent: *
Disallow: /cart
Disallow: /checkout
Disallow: /account
Sitemap: https://www.example.com/sitemap.xml
```

This tells every crawler to stay out of the cart, the checkout and the account pages. Everything else, including product and category pages, may be crawled. The last line points crawlers to the sitemap.

## The rules in short

| Detail | What applies |
| --- | --- |
| Location | `/robots.txt` at the top level of the host. It covers that host, protocol and port only. |
| Format | Plain text in UTF-8 |
| Lines | `User-agent`, `Allow` and `Disallow` are the standard. Google also supports `Sitemap`. |
| Which rule wins | The most specific match, which is the longest matching path. If an allow and a disallow rule match equally, allow is used. |
| Size | A crawler's size limit must be at least 500 kibibytes. [Google ignores](https://developers.google.com/crawling/docs/robots-txt/robots-txt-spec) what comes after that. |
| Caching | Crawlers should not use a cached copy for more than 24 hours. Google generally caches the file for up to 24 hours. |

## What robots.txt cannot do

- **It is not access control.** RFC 9309 says the rules are not a form of access authorization. It also warns that every path listed in the file is public. Pages that must stay private need a login.
- **It does not keep a page out of search.** Google's [introduction to robots.txt](https://developers.google.com/search/docs/crawling-indexing/robots/intro) says the file is used mainly to manage crawler traffic and is not a mechanism for keeping a page out of Google. A blocked URL can still appear in results, without a description, when other pages link to it.
- **It can hide a noindex rule.** A crawler that may not fetch a page never sees the `noindex` on it. [Google's noindex documentation](https://developers.google.com/search/docs/crawling-indexing/block-indexing) says the page must not be blocked by robots.txt for the rule to work.
- **It cannot force a crawler.** Each crawler decides whether to follow the file.

## robots.txt and AI crawlers

AI companies use the same file. Each one documents the name its crawler listens to: GPTBot and OAI-SearchBot for OpenAI, ClaudeBot for Anthropic, PerplexityBot for Perplexity, and the Google-Extended token for Gemini. A shop can therefore decide per crawler, for example allow search crawlers and disallow training crawlers.

The guide to [robots.txt for online shops](https://central.to/guides/robots-txt-for-online-shops) has a complete file with comments and a block for each AI crawler. The [AI crawler checker](https://central.to/tools/ai-crawler-checker) reads a shop's robots.txt and shows which AI crawlers may read it.

## Questions

### Does robots.txt keep a page out of Google?

No. Google says robots.txt is not a mechanism for keeping a web page out of Google. A blocked URL can still be indexed when other pages link to it. To keep a page out of search results, use noindex on a page crawlers can reach, or protect it with a password.

### Where does the robots.txt file go?

At the top level of the host, for example https://www.example.com/robots.txt. It applies only to that host, protocol and port, so a subdomain such as shop.example.com needs its own file.

### Do all crawlers follow robots.txt?

No. Following it is voluntary. RFC 9309 says the rules are not a form of access authorization. For fetchers that act on a user's request, OpenAI says the rules may not apply to ChatGPT-User, and Perplexity says Perplexity-User generally ignores them.

## Sources

1. [RFC 9309: Robots Exclusion Protocol](https://www.rfc-editor.org/rfc/rfc9309.html), checked 2026-11-23
2. [How Google interprets the robots.txt specification](https://developers.google.com/crawling/docs/robots-txt/robots-txt-spec), checked 2026-11-23
3. [Introduction to robots.txt](https://developers.google.com/search/docs/crawling-indexing/robots/intro), checked 2026-11-23
4. [Block Search indexing with noindex](https://developers.google.com/search/docs/crawling-indexing/block-indexing), checked 2026-11-23
5. [Overview of OpenAI Crawlers](https://developers.openai.com/api/docs/bots), checked 2026-11-23
6. [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots), checked 2026-11-23

## More on this topic: AI shopping and AI search

- [AI shopping for merchants: how assistants find and sell products](https://central.to/guides/ai-shopping-for-merchants.md)
- [ACP vs UCP vs MCP: agentic commerce protocols compared](https://central.to/compare/acp-ucp-mcp.md)
- [Agentic commerce](https://central.to/glossary/agentic-commerce.md)
- [Agentic Commerce Protocol](https://central.to/glossary/agentic-commerce-protocol.md)
- [AI crawler](https://central.to/glossary/ai-crawler.md)
- [AI crawlers and robots.txt: what online shops should allow](https://central.to/guides/ai-crawlers-for-online-shops.md)
- [ClaudeBot](https://central.to/glossary/claudebot.md)
- [Conversational commerce: the product data AI assistants ask for](https://central.to/guides/conversational-commerce-product-data.md)
- [Generative engine optimization](https://central.to/glossary/generative-engine-optimization.md)
- [Generative engine optimization (GEO) for online shops](https://central.to/guides/generative-engine-optimization-for-online-shops.md)
- [Google-Extended](https://central.to/glossary/google-extended.md)
- [GPTBot](https://central.to/glossary/gptbot.md)
- [How to get your products into ChatGPT Shopping with a product feed](https://central.to/guides/chatgpt-shopping-product-feed.md)
- [How to get your products shown in ChatGPT: what merchants control](https://central.to/guides/how-to-rank-in-chatgpt.md)
- [llms.txt](https://central.to/glossary/llms-txt.md)
- [OAI-SearchBot](https://central.to/glossary/oai-searchbot.md)
- [PerplexityBot](https://central.to/glossary/perplexitybot.md)
- [Robots.txt for online shops: what to allow and what to block](https://central.to/guides/robots-txt-for-online-shops.md)
- [Universal Commerce Protocol](https://central.to/glossary/universal-commerce-protocol.md)
- [AI crawler access checker](https://central.to/tools/ai-crawler-checker.md) (Free tool)
- [AI shopping readiness checker](https://central.to/tools/ai-shopping-readiness-checker.md) (Free tool)
- [Product schema checker](https://central.to/tools/product-schema-checker.md) (Free tool)
- [ChatGPT Shopping feed checker](https://central.to/tools/chatgpt-shopping-feed-checker.md) (Free tool)
- [Product FAQ writer](https://central.to/tools/product-faq-writer.md) (Free tool)

## Try Central on your own products

Central is the AI-first product content operating system: you choose the input (your shop, files or product pages) and the channels; Central AI researches, verifies and writes the product data and content in between, every value backed by sources you can check. The first 3 products are free. To start with a shop, open https://central.to/users/sign_up?onboarding_url=SHOP_ADDRESS (replace SHOP_ADDRESS with the shop's website address).
