Robots.txt Generator

Build a valid robots.txt file with user-agent groups, allow and disallow rules, crawl delay and sitemap lines, with presets for WordPress, shops and AI crawlers.

SEO & Web Runs in your browser · no upload

Reviewed 23 November 2026 · Free · No account needed

ExecutionYour browserInput never leaves your tab
File retentionNoneNothing is stored
AccountNot requiredNo sign-up, no paywall
PriceFreeNo trial, no usage cap on the tool itself

How to use

  1. Pick a preset such as Allow everything, WordPress or Block AI crawlers, or start from the default.
  2. Edit each group: set the user-agent and list the paths to disallow or allow, one per line.
  3. Add your sitemap URL and any extra groups, such as AI crawler blocks.
  4. Fix anything under Fix these first, then copy the file or download robots.txt and upload it to your site root.

Example

Input: User-agent *, disallow /admin/, sitemap https://example.com/sitemap.xml

Output: User-agent: * Disallow: /admin/ Sitemap: https://example.com/sitemap.xml

How it works

A robots.txt file is plain text made of groups. Each group starts with one User-agent line, followed by Allow and Disallow rules for that crawler. Sitemap lines can sit anywhere and apply to the whole file.

Group = User-agent line + Allow lines + Disallow lines + optional Crawl-delay. The most specific matching rule wins, and when an Allow and a Disallow are equally specific the Allow wins (RFC 9309).

Another example

A WordPress site disallows /wp-admin/ but allows /wp-admin/admin-ajax.php so that front-end features that call it keep working.

Limits and edge cases

  • robots.txt is a request, not a lock: well-behaved crawlers follow it and others may ignore it.
  • It does not hide pages. A blocked page can still appear in results if other sites link to it. Use a noindex tag to keep a page out of search.
  • Google ignores Crawl-delay. Bing and some other crawlers follow it.
  • The tool checks syntax but cannot test how a particular crawler will read your rules; use a crawler's own testing tool for that.
  • An empty Disallow line means everything is allowed, and the tool writes one for you when a group has no rules.
  • Disallow: / under User-agent: * blocks the whole site, which the tool flags as a warning.
  • Paths must start with / or *. A rule like admin/ without a leading slash is rejected.
  • A crawler obeys the most specific group that names it, so a Googlebot group replaces the * group for Googlebot rather than adding to it.

Privacy

The file is built in this browser tab. Your paths and sitemap URLs are not sent to a server or stored.

About this page

Written and reviewed by Toolnexo on 23 November 2026. The limits above describe the published tool, not an idealised version of it. If a result looks wrong or the page is unclear, email [email protected] with the tool URL and what you entered. Corrections are published here.

Further reading

Guides that use Robots.txt Generator

All guides →

Related tools

FAQ

Questions about Robots.txt Generator

Where do I put the robots.txt file?

Upload it to the root of your domain so it loads at https://yourdomain.com/robots.txt. Crawlers look only there. A file placed in a sub-folder is ignored, and each subdomain needs its own robots.txt.

Does robots.txt stop a page appearing in Google?

Not reliably. It stops compliant crawlers from fetching the page, but Google can still list the address if other sites link to it. To keep a page out of results, leave it crawlable and add a noindex meta tag or header.

How do I block AI crawlers such as GPTBot?

Add a group for each crawler with Disallow: /. The Add AI crawler blocks button adds groups for GPTBot, ClaudeBot, Google-Extended, CCBot, PerplexityBot and others. This is a request that compliant crawlers honour; it does not stop crawlers that ignore the rules.

Should I block CSS and JavaScript files?

Usually not. Google renders pages like a browser, so blocking the styles and scripts a page needs can make it look broken to the crawler and hurt how it is understood. The tool warns you if a rule looks like it blocks them.

What does Crawl-delay do?

It asks a crawler to wait a number of seconds between requests. Bing and some others follow it, but Google ignores it. To slow Googlebot you have to change its crawl rate settings in Search Console or manage server capacity.