Back to glossary

Term

robots.txt

robots.txt is a text file at a domain's root telling search-engine crawlers which URLs may be crawled and which must not.

robots.txt — explained in more detail

The robots.txt lives unconditionally at https://example.com/robots.txt and follows the Robots Exclusion Protocol. Per user agent (e.g. Googlebot, Bingbot or * for all), Allow: and Disallow: rules can be defined. Crawlers from reputable providers honour these directives; technical enforcement isn’t possible.

Important distinction: robots.txt only controls crawling, not indexing. A URL blocked via Disallow can still end up in the index if it’s linked from outside — Google then shows it without a snippet. To reliably keep something out of the index, use a noindex meta tag or HTTP header instead — but the page must remain crawlable, otherwise Googlebot won’t see the tag.

Example / practical context

User-agent: *
Disallow: /admin/
Disallow: /search?
Allow: /

Sitemap: https://example.com/sitemap.xml

This configuration blocks the admin area and parameterised search-result pages, allows the rest, and links the sitemap.

Distinction from similar terms

robots.txt = crawl control. The noindex meta tag = index control. Canonical tag = duplicate control. Three different tools for three different problems — never mix them up.

Entdecke mehr