Skip to content
Innopulse Consulting
SEO

What is robots.txt?

Short definition

robots.txt is a text file in a website’s root directory telling crawlers which areas they may fetch. It controls crawling, not indexing: a blocked URL can still appear in the index if it is linked. The protocol has been standardised as RFC 9309 since 2022.

robots.txt is the oldest agreement between websites and crawlers. It is simply structured and still a frequent cause of SEO problems, because it is often mistaken for an indexing tool.

Structure

The file sits at /robots.txt and consists of groups. Each group starts with one or more User-agent lines specifying which crawlers it applies to, followed by Disallow and Allow rules for paths. It can also reference the XML sitemap. Since 2022 the protocol has been standardised as RFC 9309; the major search engines follow it.

Crawling is not indexing

A Disallow rule prevents a crawler from fetching a page. It does not prevent the URL from appearing in the index if other pages link to it — then often without a description. To keep a page out of the index, leave it fetchable and mark it noindex. Google has not supported a noindex directive in robots.txt itself since 2019. The difference is described under indexing.

Controlling AI crawlers

Separate user-agent groups let you allow or exclude AI crawlers specifically, separately for training, search and user fetches where providers use distinct identifiers. For visibility in AI answers, that is a deliberate decision, not a default.

Common mistakes

A site-wide block carried over from the development server. Blocked CSS and JavaScript files that prevent rendering. Pages marked noindex that are also blocked via Disallow, so the crawler never sees the noindex. And blocks on areas that are actually meant to rank. After every change, checking the robots.txt report in Search Console pays off.

In Next.js

In Next.js, robots.txt can be generated as code, for example with a robots.ts in the app directory. That allows different rules per environment, so previews are blocked and production is open, and a maintained list of user agents. Reviewing the overall configuration is part of our technical SEO audit.

Sources and references
  • RFC 9309: Robots Exclusion Protocol (2022)
  • Google Search Central: introduction to robots.txt

Legal position as of October 2026. Not legal advice for an individual case.

SEO is our specialty

Innopulse doesn't just explain terms — we put them into practice for DACH companies.