SEO and search results

What is robots.txt

Also known as: robots file, Robots Exclusion Protocol

Rodrigo Fávaro, founder of ROO3
Rodrigo Fávaro Founder of ROO3
Published
The word robots.txt in large letters on a dark background, with the address roo3.co/marketing
Short answer

Robots.txt is a text file at the root of a site that tells search engine crawlers which URLs they may or may not crawl. It is mainly used to manage crawler traffic and keep crawlers from wasting time on unimportant pages. It is not a way to hide a page from Google: a blocked URL can still appear in results if other sites link to it.

Hypothetical example

A store blocks crawling of its cart and internal search with Disallow for all crawlers. Later, it creates a group just for Googlebot, with a single line allowing the images folder.

Result: Googlebot now follows only its own group and ignores the general one. The cart and internal search, which were blocked, are crawled by it again. The fix is repeating in the Googlebot group the rules that should also apply to it.

How the file works

The file always lives at example.com/robots.txt, is plain UTF-8 text and is organized in groups. Each group starts by naming the crawler it applies to, followed by the rules. The protocol was standardized by the IETF as RFC 9309.

The four lines Google understands
What it doesExample
user-agentNames the crawler the group applies toUser-agent: Googlebot
disallowA path that may not be crawledDisallow: /cart/
allowAn exception inside a blockAllow: /cart/help
sitemapThe full sitemap URLSitemap: https://example.com/sitemap.xml

What robots.txt does not do

The mistake that catches most sites: groups do not add up

Under Google's specification, only one group applies to each crawler: the most specific one matching its name. The others are ignored. A group made for Googlebot inherits nothing from the general group, the asterisk one, and the rules of the two are not combined.

In practice, anyone who creates a group for a specific crawler has to copy into it every rule that should still apply. It is a silent mistake: the file looks right and nothing warns that the block stopped working.

Robots.txt and AI crawlers

Google offers the Google-Extended token to decide whether crawled content may be used to train Gemini models and to ground their answers. Blocking Google-Extended does not affect a site's inclusion in Search or its ranking.

Other companies publish their own names. OpenAI, for example, separates OAI-SearchBot, which powers ChatGPT's search results, from GPTBot, used for training, and each can be allowed or blocked independently.

Limits and how to test

Frequently asked questions

What is robots.txt?

A text file at the root of a site that tells search engine crawlers which URLs they may or may not crawl.

Does robots.txt remove a page from Google?

No. A blocked URL can still appear in results if other sites link to it. To remove the page, use noindex or a password.

Where is robots.txt located?

Always at the root of the domain, at /robots.txt. Each subdomain has its own.

How do I block AI crawlers?

With groups for the names each company publishes, such as Google's Google-Extended and OpenAI's GPTBot. Each name controls a different use, and blocking Google-Extended does not remove the site from Search.

Why did my block stop working?

A common reason is creating a group for a specific crawler. That crawler then follows only its own group and ignores the general group's rules.

Related terms

Sources
Rodrigo Fávaro

Rodrigo Fávaro

Founder of ROO3, a marketing and technology agency in São José do Rio Preto, Brazil. Builds AI products running in production (Tobia, gerar.app, Pense Mercado) and maintains the AI Benchmark, a public ranking of AI models.

X @rodmf LinkedIn rodrigofavaro

Marketing you can measure, from the ad to the sale.

ROO3 builds and runs paid media, SEO and websites with real targets, dashboards and numbers. The first conversation is free.