How to use the robots.txt generator
- Choose a preset from the dropdown or select Custom to build your own rules.
- If using custom mode, enter one or more user-agents (use
*for all crawlers). - Add the paths you want to Disallow or Allow, one per line.
- Optionally set a Crawl-delay and add your Sitemap URLs.
- Click Generate to produce the robots.txt content, then copy it to your site root.
How the robots txt generator works
A robots.txt file tells search engine crawlers which parts of your site they may access. This robots txt generator builds that file by combining User-agent, Disallow, Allow, Crawl-delay and Sitemap directives according to RFC 9309.
When you pick a preset, the tool outputs a pre-written block. For example, the "Allow all" preset produces User-agent: * followed by an empty Disallow: directive. An empty Disallow value means no paths are blocked. If you choose "Block all", the output changes to Disallow: /, which prevents every crawler from accessing any URL on the domain.
In custom mode, each line you type in the user-agents field becomes its own User-agent: directive. All subsequent Allow, Disallow and Crawl-delay lines apply to every listed agent until the next group.
Common presets explained
The built-in presets cover the most frequent use cases when you need to create a robots txt file quickly.
| Preset | What it does |
|---|---|
| Allow all | Outputs User-agent: * with an empty Disallow. Every crawler can visit every page. |
| Block all | Outputs Disallow: /. No crawler may access any path. Useful for staging sites. |
| WordPress | Blocks /wp-admin/ but allows /wp-admin/admin-ajax.php, matching the default WordPress behaviour. |
| Block AI crawlers | Adds one group with Disallow: / for AI crawler and training tokens such as GPTBot, CCBot, anthropic-ai, ClaudeBot, Google-Extended and Bytespider while leaving the wildcard * group unrestricted. Google-Extended and Applebot-Extended are control tokens rather than separate crawlers, and robots.txt is a request that well-behaved bots follow, not a block. |
You can start with a preset and then switch to Custom to fine-tune individual paths.
Syntax rules under RFC 9309
RFC 9309 formalised the robots.txt protocol in 2022. A few key rules affect how you write your file:
- Directive names are case-insensitive (
User-agentanduser-agentare the same), but the paths after them are case-sensitive, so/Admin/and/admin/are different rules. - Each group starts with one or more
User-agentlines followed by rule lines. A blank line separates groups. - The
*wildcard matches zero or more characters in a path. The$anchor matches the end of a URL. Crawl-delayis not part of RFC 9309. It is a non-standard extension that Bing honours but Googlebot ignores, and Yandex no longer uses it either.Sitemapdirectives are global and can appear anywhere in the file, though placing them at the end is conventional.
This robots-txt-generator checks that paths start with a slash or a wildcard and that sitemap URLs are absolute, and it adds an empty Disallow: line when a group has no rules so the group is explicit.
Where to place the robots.txt file
The file must live at the root of your domain: https://example.com/robots.txt. Crawlers do not look in subdirectories. If your site uses HTTPS, the robots.txt must also be served over HTTPS.
On Apache or Nginx you can simply upload the text file to the document root. On platforms like WordPress, a virtual robots.txt is generated dynamically, but you can override it by placing a physical file or using a plugin.
After uploading, test the file with a tool like the robots.txt tester or generate an accompanying sitemap with the sitemap XML generator.
Mistakes to avoid
Even a small typo can cause unintended crawling behaviour. Watch out for these pitfalls:
- Missing leading slash. Paths must begin with
/. WritingDisallow: admininstead ofDisallow: /admin/will not match anything. - Blocking CSS and JS. Modern search engines render pages. If you disallow
/assets/where stylesheets live, your site may appear broken in search results. - Using robots.txt to hide pages. The file is public. Anyone can read it. Use authentication or
noindexmeta tags for sensitive content. - Multiple conflicting groups. A crawler obeys only the group that names it most specifically and ignores the
*group, so a bot-specific group must repeat any rules you also want it to follow. Under RFC 9309, separate groups that name the same bot are combined. - Forgetting the sitemap line. Adding
Sitemap: https://example.com/sitemap.xmlhelps crawlers discover your pages faster.
Worked examples
| Example | Input | Result |
|---|---|---|
| Allow all crawlers | Preset: allow-all | User-agent: * / Disallow: |
| Block all crawlers | Preset: block-all | User-agent: * / Disallow: / |
| WordPress default | Preset: wordpress | User-agent: * / Disallow: /wp-admin/ / Allow: /wp-admin/admin-ajax.php |
| Block common AI crawlers | Preset: block-ai | User-agent: * / Disallow: / User-agent: GPTBot / User-agent: CCBot / User-agent: anthropic-ai / User-agent: ClaudeBot / User-agent: Google-Extended / User-agent: Bytespider / User-agent: Amazonbot / User-agent: Applebot-Extended / User-agent: FacebookBot / User-agent: cohere-ai / User-agent: Diffbot / User-agent: FriendlyCrawler / User-agent: img2dataset / User-agent: omgili / User-agent: omgilibot / User-agent: YouBot / Disallow: / |
| Custom rules with sitemap | Preset: custom; User-agents (one per line): * / GPTBot; Disallow paths (one per line): /wp-admin/ / /; Allow paths (one per line): /wp-admin/admin-ajax.php; Crawl-delay (seconds): 10; Sitemap URLs (one per line): https://example.com/sitemap.xml | User-agent: * / User-agent: GPTBot / Disallow: /wp-admin/ / Disallow: / / Allow: /wp-admin/admin-ajax.php / Crawl-delay: 10 / Sitemap: https://example.com/sitemap.xml |
FAQ
What is a robots.txt file?
A robots.txt file is a plain text file placed at the root of a website that tells search engine crawlers which URLs they are allowed or disallowed to access.
Does this robots txt generator upload my data?
No. The entire tool runs in your browser. Nothing you type is sent to any server.
Can I block AI crawlers with this tool?
Yes. Select the "Block AI crawlers" preset to add Disallow rules for GPTBot, CCBot, anthropic-ai, ClaudeBot, Google-Extended and Bytespider.
Does Google respect the Crawl-delay directive?
No. Googlebot ignores Crawl-delay entirely. Bing honours it, and Yandex no longer does. Google has retired the Search Console crawl-rate limiter as well, so on Google you reduce load by serving fast responses or temporary 503 or 429 status codes.
Where do I put the generated robots.txt file?
Upload it to the root directory of your domain so it is accessible at https://yourdomain.com/robots.txt.
Is a robots.txt file required for every website?
It is not strictly required. If you have no restrictions, you can omit it or use the Allow all preset. However, having one is good practice for directing crawlers to your sitemap.
How do I verify my robots.txt syntax?
You can use the companion robots.txt tester to check whether specific URLs are allowed or blocked by your file.
How do I create a robots.txt file with this robots txt file generator?
Pick a preset or choose Custom, list the user-agents, add the Allow and Disallow paths and any Sitemap URLs, then click Generate and save the text as robots.txt in the root of your site. Use the robots.txt tester afterwards to check specific URLs. If you were searching for a create robots txt generator that needs no sign-up, this page is one: everything runs in your browser.