Frequent questions about robots.txt: does it prevent indexing, can it protect sensitive files, and how does it interact with noindex.
- Does robots.txt prevent indexing?
No, it prevents fetching. A page blocked by robots.txt can still appear in search results if other pages link to it; the snippet will be empty.
- Can robots.txt protect sensitive files?
No. Use authentication. Scrapers ignore robots.txt.
- robots.txt vs noindex?
robots.txt blocks fetching; noindex blocks indexing. For pages you want crawled but not indexed, use noindex, not robots.txt.
- Where does robots.txt live?
At the domain root:
https://example.com/robots.txt. Subdirectories are not consulted.