How to use it
- 1
Start from “allow everything” unless the site is a staging copy.
- 2
List paths crawlers should skip, such as admin, cart or filtered pages.
- 3
Add separate rules for specific crawlers, for example AI training bots.
- 4
Add your sitemap URL, test a few paths, then upload the file as /robots.txt at your domain root.
Crawling is not indexing
robots.txt asks crawlers not to fetch a URL. A blocked URL can still appear in results if other pages link to it, just without a description. To keep a page out of results, allow crawling and add a noindex tag instead.
The rules follow RFC 9309: the most specific user-agent group applies, and within it the longest matching path wins. The tester below the output uses the same logic.
AI crawlers
Several AI companies publish crawler names (GPTBot, ClaudeBot, Google-Extended, CCBot). Adding a group with “Disallow: /” for them asks them not to use your pages. Respecting robots.txt is voluntary, so it is a request, not access control.
Questions
Where does robots.txt go?
At the root of the host: https://example.com/robots.txt. Each subdomain needs its own file.
Should I block CSS and JavaScript?
No. Search engines need them to render the page; blocking them can hurt how your pages are understood.
What do * and $ mean in a path?
* matches any sequence of characters, and $ anchors the end of the URL. “/*.pdf$” blocks every URL ending in .pdf.
Updated:
