Websites & SEO

What is robots.txt?

robots.txt is a plain text file at the root of a website (yoursite.com/robots.txt) that tells crawlers, such as Googlebot or AI search bots, which paths they may or may not visit.

What it can and cannot do

It controls crawling, not indexing. A page blocked in robots.txt can still appear in search results if other sites link to it, just without a description. To keep a page out of results, use a noindex tag and leave it crawlable so the tag can be read. robots.txt is also public, so it should never be used to hide sensitive pages.

Common uses and mistakes

Typical rules block admin areas, internal search results and endless filter combinations, and point to the sitemap. The classic mistake is a leftover "Disallow: /" from a staging site, which tells every crawler to ignore the entire website after launch.

Questions, answered

Yes, for crawlers that respect it, such as GPTBot, ClaudeBot or Google-Extended. You can allow AI search crawlers while blocking training crawlers, depending on your goals.

At the root of each host: yoursite.com/robots.txt. A file in a subfolder is ignored.

By the Stegnor team · Updated