# What is robots.txt?

> robots.txt is a text file at the root of a site that tells crawlers which paths they may fetch. RFC 9309 defines its rules as an internet standard.

Canonical: https://promptlyfound.com/glossary/robots-txt
Updated: 2026-12-01

## Short answer

robots.txt is **a plain-text file at the root of a site that tells crawlers which paths they may fetch**. The IETF published its rules as RFC 9309 in September 2022. AI companies document a token for each bot, so a site can block a training crawler and still allow AI search bots.

## Key findings

- RFC 9309 says the rules must be in a file named /robots.txt, in lowercase, in the top-level path of the service, encoded as UTF-8 plain text. [1]
- RFC 9309 says crawlers should not use a cached copy of robots.txt for more than 24 hours, unless the file is unreachable. [1]
- RFC 9309 says robots.txt rules are not a form of access authorization, and that listing paths in the file makes them public. [1]
- 25.12% of cited domains with a valid robots.txt name at least one AI crawler in it.

robots.txt is a text file that a site publishes at the path /robots.txt. Crawlers read it before they fetch other pages, and it tells each crawler which paths it may request. For AI crawlers, it is the main control that the operators document.

## How does robots.txt work?

A robots.txt file is a list of groups, and each group gives rules to one or more crawlers. [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309.html), the Robots Exclusion Protocol, defines the format. It extends a method first defined in 1994.[1] Each group starts with one or more User-agent lines, followed by Allow and Disallow rules. A crawler obeys the group that matches its product token. If no group matches, it obeys the group for `*`. Within a group, the most specific matching path wins.[1]

```
User-agent: *
Allow: /

User-agent: GPTBot
Disallow: /
```

In this file, GPTBot may fetch no path, and every other crawler may fetch every path.

[Google's robots.txt documentation](https://developers.google.com/crawling/docs/robots-txt/robots-txt-spec) adds details for its crawlers. The rules apply only to the host, protocol and port where the file is hosted. Google enforces a size limit of 500 KiB and generally caches the file for up to 24 hours.[2]

## What can robots.txt not do?

robots.txt states a request and does not enforce it. RFC 9309 says its rules are not a form of access authorization. It also warns that listing a path in the file makes the path public, and that private content needs a security measure such as HTTP authentication.[1] Cloudflare's [Content Signals site](https://contentsignals.org/) says some crawler operators may disregard robots.txt. It adds that courts and regulators may conclude that robots.txt files do not impose enforceable legal obligations.[4]

## How does robots.txt control AI crawlers?

robots.txt lets a site make a separate choice for each AI bot. [OpenAI's crawler overview](https://developers.openai.com/api/docs/bots) says a site can allow OAI-SearchBot to appear in search results and disallow GPTBot to keep its content out of training. It says its search systems can take about 24 hours to adjust after a robots.txt update.[3] Fetchers that act on a user's request are an exception. OpenAI says robots.txt rules may not apply to ChatGPT-User.[3]

Many sites already use robots.txt for AI bots. In our November 2026 crawl, 25.12% of the domains cited in AI answers that had a valid robots.txt named at least one AI crawler in it. [Do websites cited by AI answers block AI crawlers?](https://promptlyfound.com/research/ai-crawler-blocking) gives the figures for each bot. [How to allow or block AI bots in robots.txt](https://promptlyfound.com/crawlers/robots-txt-for-ai) shows the rules to write, and the [robots.txt generator](https://promptlyfound.com/tools/robots-txt-generator) builds a file.

## Sources

1. RFC 9309: Robots Exclusion Protocol. IETF. https://www.rfc-editor.org/rfc/rfc9309.html
2. How Google interprets the robots.txt specification. Google for Developers. https://developers.google.com/crawling/docs/robots-txt/robots-txt-spec
3. Overview of OpenAI Crawlers. OpenAI. https://developers.openai.com/api/docs/bots
4. Content Signals. Cloudflare. https://contentsignals.org/

---

This is a plain-text copy of https://promptlyfound.com/glossary/robots-txt from Promptly Found. The web page is the canonical version and includes the charts.
