robots.txt Generator

Build a robots.txt with per-user-agent rules. Add Allow/Disallow lines for any path, declare sitemaps, set crawl-delay. Output is RFC 9309-compliant and works with all major crawlers.

How to use the robots.txt Generator

Tick the rules you want, optionally add custom lines. Generate produces the complete file. Place at the root of your domain at /robots.txt. Test the result with the robots.txt Tester.

Writing a correct robots.txt

A robots.txt file tells crawlers which parts of your site they may request. The syntax is small but easy to get subtly wrong — a stray Disallow: / can deindex an entire site, and rules apply per user-agent in ways that trip people up.

This generator builds a compliant file from checkboxes: allow everything by default, block common paths like /admin/ or /api/, add a sitemap declaration, and optionally block AI crawlers such as GPTBot. The output follows RFC 9309 and works with all major crawlers. Because robots.txt only controls crawling, not indexing, verify a specific page's true indexability with the noindex tester.

Common use cases

  • New sites — produce a sensible robots.txt from scratch.
  • Blocking admin areas — keep crawlers out of private paths.
  • Sitemap discovery — declare your sitemap for search engines.
  • AI opt-out — block GPTBot, Claude-User, and similar agents.
  • Crawl control — add per-user-agent allow and disallow rules.

Frequently asked questions

Does robots.txt stop a page being indexed?

No — it controls crawling, not indexing. A disallowed URL can still be indexed without its content. Use a noindex directive to keep a page out of results.

Where do I put the file?

At your domain root, as /robots.txt. Crawlers look there and nowhere else for it.

Will blocking AI crawlers stop all scraping?

It asks well-behaved bots like GPTBot to stay out; it can't enforce against agents that ignore the standard.

How do I confirm a page is indexable?

Check it in the noindex / robots meta tester, which weighs robots.txt, headers, and meta tags together.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: