Skip to content
Glossary · Letting AI crawlers in

robots.txt

Also called robots file, Robots Exclusion Protocol, robots exclusion standard

Definition

robots.txt is a plain-text file at the root of a site that tells crawlers, by user-agent name, which URLs they may and may not fetch.

Updated 15 Sept 20264 sources, each checked3 min read

The idea

What it is

robots.txt is the oldest control a site owner has over automated visitors. It lives at the top level of a host, is organised into groups that each start with a User-agent line, and lists Allow and Disallow paths for the agents that group names. A crawler reads the group that names its own token, or the wildcard group if none does.

The format is now a published standard, RFC 9309, which pinned down details that used to vary between crawlers, such as how groups are matched and how much of the file a crawler must read.

The evidence

Why it matters

AI search has made this small file strategic again. The same few lines now decide whether a page can be used to train a model, whether it can be indexed for an assistant's answers, and whether it is crawled for classic search, and those are separate decisions with separate user agents.

It is also widely misunderstood. A disallow line is a request that compliant crawlers honour. It is not access control, it does not reliably keep a URL out of search results, and some user-triggered fetchers may not apply it at all.

The steps

How to do it

  1. 1

    Serve the file at the root of each host and protocol you run, as /robots.txt in lowercase. A subdomain needs its own file.

  2. 2

    Keep a wildcard group (User-agent: *) that states your default, then add a group only for agents you want to treat differently.

  3. 3

    Name AI agents by their documented tokens. Training: GPTBot, ClaudeBot. AI search: OAI-SearchBot, Claude-SearchBot, PerplexityBot. For Gemini training, use the Google-Extended token; it does not change how Googlebot crawls you for Search.

  4. 4

    Use noindex, not Disallow, for pages that must not appear in search. A disallowed URL cannot be crawled, so a noindex on it is never seen.

  5. 5

    After any change, fetch the live file and confirm which group each agent lands in, then allow time for vendors to pick it up.

Run this check on your own site

Free, no sign-up.

AI crawler checker
What goes wrong

Common mistakes

  • Disallowing a page to hide it, which can leave the bare URL visible in results while blocking the crawler from ever reading a noindex.
  • Blocking all AI user agents to opt out of training, which also blocks the search agents that decide whether assistants can cite you.
  • Assuming blocking Google-Extended removes a site from AI Overviews. Google documents it as a training control that does not affect inclusion in Google Search.
  • Using robots.txt to protect private content. It is published, readable by anyone, and advisory.
In practice

An example

A group that opts out of training only

The lines "User-agent: GPTBot" followed by "Disallow: /" ask OpenAI's training crawler to fetch nothing, while OAI-SearchBot, which OpenAI documents as its search agent, still falls through to the wildcard group and can index the public site for ChatGPT search.

OpenAI, Overview of OpenAI crawlers, 15 Sept 2026
Nearby terms

Not to be confused with

noindex
robots.txt controls whether a URL may be fetched. noindex, set in a meta tag or header, controls whether a fetched page may appear in search results, and only works if the page can be crawled.
llms.txt
robots.txt restricts what crawlers may fetch. llms.txt is a proposed markdown file that points language models at the content worth reading, and grants or blocks nothing.
Checked

Sources

  1. 1IETF, RFC 9309: Robots Exclusion Protocol read 15 Sept 2026
  2. 2Google Search Central, Introduction to robots.txt read 15 Sept 2026
  3. 3Google Search Central, Google's common crawlers read 15 Sept 2026
  4. 4OpenAI, Overview of OpenAI crawlers read 15 Sept 2026

Content that is built to be cited.

Every draft grounded in your own documents, with each knowledge-based claim cited to its source. 7 days free on one domain.