Robots.txt Generator
Build a robots.txt file with per-crawler rules and a sitemap reference, ready to upload to your site's root.
What goes into a robots.txt file
| Directive | What it does |
|---|---|
| User-agent | Names which crawler a rule group applies to — a specific bot, or * for all crawlers. |
| Disallow | Tells a crawler not to access a given path. |
| Allow | Carves out an exception within a disallowed area, for one file or subfolder. |
| Sitemap | Points crawlers to your sitemap's location so they can discover your pages more efficiently. |
Robots.txt controls crawling, not indexing
This is the single most common mix-up with robots.txt: disallowing a path tells crawlers not to fetch it, but it doesn't guarantee that page stays out of search results. If another site links to a blocked URL, Google can still list it with no snippet, since it was never able to crawl the page to find a noindex instruction. If your real goal is keeping a specific page out of search results, let it be crawled and add a page-level noindex tag instead of blocking it here.
It's also worth knowing that Google no longer supports the crawl-delay, nofollow, or noindex directives inside robots.txt — they're simply ignored by Googlebot, even though some other crawlers, like Bing's, still document support for crawl-delay.
Managing AI crawlers
Alongside traditional search engine bots, robots.txt is also where site owners set rules for AI crawlers like GPTBot, ClaudeBot, and PerplexityBot. Without any explicit rule, most of these crawlers can access your content by default. If you'd rather restrict a specific one, add a dedicated user-agent group naming that crawler along with the paths you want to disallow — since each AI company documents its own crawler's name and behavior, it's worth checking their current documentation if this matters to you.
Common robots.txt mistakes
- Unintended prefix matches. Disallow: /admin blocks any path starting with those characters, including /administrator/ — add a trailing slash if you only mean one specific folder.
- Case sensitivity. A rule for /Private/ won't match a path served as /private/ — check your site's actual URL casing.
- Relying on Disallow to remove pages from search. Use a noindex tag on the page itself instead.
- Forgetting the Sitemap line. It costs nothing to include and helps crawlers discover your pages more efficiently.
Frequently asked questions
- Yes, completely free with no signup or usage limit.
- Upload it as robots.txt at the root of your domain, e.g. https://example.com/robots.txt.
- Disallow tells crawlers not to access a path; Allow carves out an exception within a disallowed area, useful when you want to block a folder but allow one file inside it.
- It's a request that well-behaved crawlers respect, not a security measure — it doesn't prevent access, and some bots ignore it entirely.
- No — this is one of the most common robots.txt mistakes. Disallowing a URL only tells Google not to crawl it; if another site links to that page, Google can still show it in results with no snippet, since it was never able to fetch the page to see any noindex instruction. To actually remove a page from search results, let it be crawled and use a page-level noindex meta tag or HTTP header instead of blocking it in robots.txt.
- No. Google officially dropped support for crawl-delay, along with nofollow and noindex, in robots.txt back in 2019 — any of these directives will simply be ignored by Googlebot. Some other crawlers, including Bing's, do still document support for crawl-delay, so it isn't entirely useless, but it won't have any effect on how fast Google crawls your site.
- That's a decision based on your own preferences — without explicit rules, most AI crawlers are free to access your content by default. If you want to restrict specific ones, add a dedicated user-agent group for that crawler's name with the paths you want to disallow. Since each AI company documents its own crawler's behavior and how it responds to robots.txt, it's worth checking their current documentation if a specific bot's compliance matters to you.
- Robots.txt paths are matched as prefixes, not exact folder names — a rule like Disallow: /admin blocks any path that starts with those characters, including /administrator/ or /admin-login/. If you only want to block a specific folder, write it with a trailing slash, like Disallow: /admin/, and double check for any other paths that might unintentionally share that prefix.
- Yes. A rule like Disallow: /Private/ will not block a path served as /private/ — the casing has to match exactly what your site actually serves, so it's worth checking your live URLs before finalizing your rules.
- Pointing to your sitemap's URL gives crawlers an easy way to discover the full list of pages on your site, which can help them find and crawl your content more efficiently — especially useful alongside any Disallow rules that intentionally keep certain sections out of that discovery process.