robots.txt, built correctly
robots.txt is the file crawlers read first to learn which parts of your site they may fetch. A small mistake — a stray Disallow: / or a malformed path — can deindex an entire site, so it pays to generate it cleanly. This builder produces a valid file from simple inputs and lets you copy or download it.
How it works
The Robots Exclusion Protocol groups directives under one or more User-agent lines. This builder emits a single group: a User-agent line, then one Disallow: line per disallow path and one Allow: line per allow path. Paths are matched as prefixes from the site root, so Disallow: /admin blocks /admin and everything beneath it. An optional Crawl-delay line is added when you set a positive number. Finally a Sitemap: directive with your absolute sitemap URL is appended at the end, which applies regardless of user-agent group.
Example output
To allow the whole site, leave the disallow box empty. A generated file looks like this:
User-agent: *
Disallow: /admin
Disallow: /cart
Allow: /admin/help
Crawl-delay: 10
Sitemap: https://example.com/sitemap.xml
Targeting specific crawlers
Using User-agent: * applies your rules to every compliant bot. You can instead target a named crawler — for example User-agent: Googlebot — to set different policies for different bots. Multiple groups are supported in the full robots.txt format; this builder generates one group per session, so run it twice and combine the outputs if you need separate policies for search crawlers and AI training crawlers.
Common named crawlers you might want to address:
| Crawler | Operator | Typical purpose |
|---|---|---|
| Googlebot | Search indexing | |
| GPTBot | OpenAI | AI model training |
| ClaudeBot | Anthropic | AI research |
| CCBot | Common Crawl | Open dataset |
| Bingbot | Microsoft | Search indexing |
Common mistakes to avoid
Disallow: / blocks everything. If you accidentally leave a forward slash alone in the disallow field, every crawler is locked out of your whole site. Always double-check the generated file before uploading.
Paths are case-sensitive on most servers. A rule for /Admin does not cover /admin on a Linux-based host. Use lowercase paths to match your actual URL structure.
robots.txt is not a security tool. It is advisory and public. Any path you list in a Disallow rule is readable by anyone who opens the file. For real access control, use authentication.
Blocking a URL does not deindex it. If a page is already in Google’s index, a new Disallow rule will stop recrawling but not remove the existing listing. You need a noindex meta tag or the URL Removal Tool in Search Console to remove a cached page.
Always verify the result in Google Search Console’s robots.txt tester before deploying.