Skip to content
Glossary

What is robots.txt?

By SearchChamp teamUpdated

robots.txt is a plain-text file served at the root of a domain (example.com/robots.txt) that tells web crawlers which paths they can or cannot fetch. Defined by the Robots Exclusion Protocol, formalized as RFC 9309 in 2022. Modern robots.txt files include rules for Googlebot, Bingbot, AI bots (GPTBot, ClaudeBot, PerplexityBot), and SEO crawlers (AhrefsBot, SemrushBot). Critical distinction: robots.txt blocks crawling, not indexing — to remove a page from the index, use noindex meta or HTTP header instead.

robots.txt in context

The Robots Exclusion Protocol was created by Martijn Koster in 1994 — the same year as the first search engines. It remained an informal convention for 28 years until standardized as RFC 9309 in 2022. The 2023-2026 era saw an explosion of new bot User-Agents from AI companies — OpenAI's GPTBot (Aug 2023), Anthropic's ClaudeBot (Oct 2023), and Perplexity's bot all gained adoption. Most sites now make explicit allow/block decisions for AI bots — SearchChamp's robots.txt allows GPTBot, ClaudeBot, PerplexityBot, and Google-Extended; blocks AhrefsBot, SemrushBot, and MJ12bot.

Example

A typical SaaS robots.txt: User-agent: GPTBot Allow: / User-agent: ClaudeBot Allow: / User-agent: AhrefsBot Disallow: / User-agent: * Disallow: /api/ Disallow: /dashboard/ Disallow: /auth/ Sitemap: https://example.com/sitemap.xml Allows AI engines to read the public marketing surface. Blocks SEO competitors from scraping the link graph. Blocks generic crawlers from authenticated paths. Points to the sitemap.

Related terms

llms.txt

Plain-text file giving AI engines a structured site summary.

Technical SEO

Discipline of making a site crawlable, renderable, and indexable.

Canonical URL

The preferred URL when multiple URLs serve similar content.

FAQ

Common questions about robots.txt.

robots.txt is a plain-text file at the root of a domain that tells web crawlers which paths they can or cannot fetch. It's used to keep crawlers out of admin/auth/dashboard paths, block SEO-competitor crawlers from scraping your site, and make explicit allow/block decisions for AI bots like GPTBot and ClaudeBot — but it does NOT control whether a page can be indexed, only whether it can be crawled.
No — it prevents crawling. A blocked URL can still appear in search results if Google discovers the URL through external links (indexed without content). To remove from the index, use a noindex meta tag or HTTP header — and don't block the URL in robots.txt, because Google needs to crawl the page to see the noindex directive.
You create the exact trap the previous answer warns about, in reverse: if you Disallow a URL in robots.txt AND put a noindex tag on that page, Google can never crawl the page to see the noindex directive — so instead of being removed from the index, the URL can sit indexed with no content shown, indefinitely. The correct order is: let the page be crawled with noindex in place, wait for Google to process it and drop it from the index, THEN block it in robots.txt if you want to stop future crawl attempts.
Disallow tells crawlers not to fetch matching paths. Allow overrides a Disallow for a more specific path (e.g., Disallow: /admin/ + Allow: /admin/public/). Most engines support both; legacy bots may only honor Disallow.
Audit it

Catch robots.txt mistakes before crawlers do.

SearchChamp’s Site Audit parses your robots.txt for syntax errors, conflicts, and accidentally blocked critical paths — alongside 40+ technical and AI-readiness checks. 7-day free trial.