HomeGlossaryrobots.txt

What is robots.txt?

robots.txt is a site-root file that suggests which paths crawlers may fetch. How it relates to sitemaps, llms.txt, and responsible scraping.

robots.txt is a plain text file published at the site root (https://example.com/robots.txt) that gives crawlers guidance about which paths they should or should not fetch. It uses a simple language of User-agent groups, Allow and Disallow rules, and optional Sitemap directives. It is not an access-control firewall. Anyone can still request a URL over HTTP. It is a convention polite crawlers choose to honor.

Search engines popularized robots.txt. Teams still use it to keep staging paths, infinite calendar URLs, or soft-duplicate filters out of automated crawls. A Sitemap line inside robots.txt points crawlers at XML sitemaps so discovery does not rely only on link following.

For AI agents and scrape APIs, robots.txt is part of responsible design conversations alongside site terms and rate limits. Product teams decide how strictly their crawler honors the file. Regardless of enforcement, reading robots.txt helps you understand which paths the site owner considers off-limits for automated agents.

robots.txt is different from llms.txt. robots.txt talks to crawlers about fetch permission style rules. llms.txt talks to language models about which pages are high signal. A site can publish both: robots.txt to guide crawlers, llms.txt to guide agents toward docs and pricing.

Webcrawl’s map and crawl workflows are built for deliberate URL discovery with budgets. When you design documentation ingestion, start with map on the docs origin, respect the site’s published rules and terms, and keep request rates reasonable. Pair discovery with scrape only for URLs you intend to store.

If you publish your own site for agents, keep robots.txt accurate, add sitemap references, and consider an llms.txt so agents do not need to guess your information architecture. That combination reduces wasted crawl credits for everyone involved. The robots.txt language is intentionally small. User-agent lines select which crawlers a rule block applies to. Disallow and Allow paths are prefix rules, not rich regular expressions in the classic specification. Comments start with #. Crawl-delay appears in some ecosystems as an extension. Sitemap lines advertise XML sitemaps. Because the format is simple, mistakes are common: disallowing / with a trailing rule you did not intend, or forgetting that matching is path-based.

Security teams sometimes treat robots.txt as a hiding place for sensitive admin URLs. That is a bad idea. Anything listed in Disallow is still publicly readable by humans and by clients that ignore the file. Use real authentication for private surfaces. Use robots.txt for crawler traffic shaping and discovery hints, not secrecy.

AI products complicate the old “search engine crawler” mental model. An agent fetching a single URL on behalf of a user is not the same as a wide archival crawl, but both can honor published guidance. Teams writing agent tools should document their robots.txt posture, offer configuration when customers crawl their own domains, and default toward restraint on third-party sites.

Publishers who want agents to succeed should keep robots.txt aligned with reality, link sitemaps, and add llms.txt for curated orientation. That trio (robots, sitemap, llms.txt) gives automated readers a complete etiquette and discovery story without requiring a sales call.

Typical robots.txt shape

User-agent: *
Disallow: /admin
Disallow: /cart
Allow: /docs

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

Related terms

Every page, one tool

Give your agent the web.

Start for free