How to use Robots.txt Generator
- Start from a preset (allow all, block all, or block /admin/ and /tmp/) or edit the first rule group.
- Enter the user-agents, one per line (use * for all bots), then the paths to disallow and any exceptions to allow.
- Add more rule groups for other bots if needed, and list your sitemap URLs at the bottom.
- Copy the text or download robots.txt and upload it to the root of your site, so it is reachable at /robots.txt.
Features
- Presets for allow all, block all and blocking common private paths
- Several rule groups, each with one or more user-agents
- Allow and Disallow lines with path checks
- Optional Crawl-delay per group
- Sitemap lines with full URL checks
- Warnings for paths that do not start with "/" and for invalid names
Examples
| Input | Result |
|---|---|
| User-agent *, Disallow /admin/, Sitemap https://example.com/sitemap.xml | User-agent: * Disallow: /admin/ Sitemap: https://example.com/sitemap.xml — A blank line separates rule groups from the Sitemap line. |
| Block all preset | User-agent: * Disallow: / — Asks compliant crawlers not to crawl any path. It does not remove pages already indexed. |
Limitations
- robots.txt is a request to crawlers that follow the rules. It is not access control, and it does not hide private content.
- Blocking a page from crawling does not by itself keep it out of search results. Use a noindex directive on a crawlable page for that.
- Google ignores Crawl-delay; some other crawlers honor it. The tool cannot test how a particular crawler reads your file.
Learn more
The robots.txt file tells crawlers which parts of a site they may request. It follows the Robots Exclusion Protocol, now standardized as RFC 9309. The file lives at the root of the host, is plain text, and is read before a compliant crawler visits other pages.
Rules are written in groups. A group starts with one or more User-agent lines and is followed by Allow and Disallow lines with paths. The most specific matching rule wins, which lets you block a folder and still allow one file inside it. A Sitemap line can appear anywhere and points to your sitemap with a full URL.
Two warnings matter. First, robots.txt is public and only advisory: anyone can read it, and bad bots ignore it, so never use it to hide sensitive pages. Second, blocking crawling is not the same as blocking indexing. If a page is blocked, search engines cannot read a noindex tag on it, so to remove a page from results you should allow crawling and add noindex. Test the file in the tools provided by the search engines you care about.
Frequently asked questions
Where do I put the robots.txt file?
In the root of the host, so it is available at https://example.com/robots.txt. Each subdomain needs its own file.
What does Disallow: / do?
It asks the named crawlers not to crawl any path on the site. An empty Disallow line means nothing is blocked.
Does robots.txt stop pages from appearing in Google?
Not reliably. A blocked URL can still be listed if other pages link to it. To keep a page out of results, use noindex on a page that crawlers can fetch.
Should I add my sitemap?
Yes, a Sitemap line helps crawlers find your sitemap. Use a full URL that starts with http:// or https://.
Sources
Last reviewed: September 30, 2026