What Is robots.txt? Allow, Disallow & How Bots Actually Treat It
A plain-English guide to the web's voluntary crawler ruleset, when Allow is needed, and where robots.txt stops working.
What robots.txt Actually Is
robots.txt is a plain text file hosted at the root of a domain (for example, https://voightk.dev/robots.txt) defined by the Robots Exclusion Protocol (RFC 9309). Before a cooperative crawler fetches pages from a site, it checks robots.txt to see which paths the site owner wants crawled and which paths should be skipped.
It is strictly a voluntary convention, not an access control mechanism. Well-behaved search engines, SEO crawlers, and major AI crawlers follow it; malicious scrapers and vulnerability scanners ignore it completely.
Do You Actually Need Allow: /?
By default, everything on a public website is already allowed if no Disallow rule matches it. You do not need to write Allow: / for every bot just to let them crawl your site.
You only need an explicit Allow: line in two cases:
- Overriding a broader
Disallow:rule: For example, blockingUser-agent: *withDisallow: /while explicitly permittingUser-agent: GooglebotwithAllow: /, or disallowing/private/while allowing/private/public-page. - Explicit signaling: Some site owners include
User-agent: OAI-SearchBot+Allow: /to make their intent unmistakable to auditors, partners, or AI crawler teams.
Allow vs. Disallow Examples
To explicitly allow a specific crawler (or override a wildcard block):
User-agent: ClaudeBot
Allow: /
To ask a specific crawler to stay out of the entire site:
User-agent: ClaudeBot
Disallow: /
To allow general crawling while asking bots to skip a specific section:
User-agent: *
Allow: /
Disallow: /internal/Search Crawlers vs. AI Crawlers vs. Scrapers
Not all bots behave the same way:
- Search indexers (Googlebot, Bingbot, YandexBot): Strictly honor
robots.txtand publish official ASNs / IP lists so you can verify them. - AI training & retrieval crawlers (ClaudeBot, GPTBot, OAI-SearchBot, PerplexityBot): Major labs separate training crawlers from live search/user-fetchers so site owners can block training while still allowing search citations.
- Spoofed scrapers & vulnerability scanners: Ignore
robots.txtcompletely (and sometimes even readrobots.txtto discover sensitive paths!). Never list secret admin URLs inrobots.txt; protect private endpoints with real authentication andX-Robots-Tag: noindex, nofollow.
Frequently Asked Questions
Does Disallow: / hide a page from attackers or keep it private?
No. robots.txt is public and voluntary. Anyone can read it, and uncooperative bots ignore it. Always use real authentication or server-side access controls for private pages.
If I don't have a robots.txt file, can bots crawl my site?
Yes. Under RFC 9309, a missing robots.txt (HTTP 404) means crawlers are permitted to access all public URLs on the site.
Why do some Encyclopedia of Bots profiles mention robots.txt and others don't?
Only cooperative crawlers honor robots.txt. For headless frameworks, spoofed scrapers, and vulnerability scanners, robots.txt has no effect, so verification and behavioral or network checks are required instead.