Robots.txt Generator

A robots.txt with allow and disallow rules, sitemaps and an AI crawler block.

About Robots.txt Generator

A robots.txt generator that builds user-agent groups with allow and disallow paths, crawl delay and sitemap lines, with a preset for blocking AI crawlers.

How to use

  1. Start from a preset: allow everything, block everything, or block AI crawlers.
  2. Edit each group. List the user-agents it applies to, then the paths to disallow and any exceptions to allow, one per line. Add a group for crawlers that need different rules.
  3. Add your sitemap URLs, then copy the text or download it as robots.txt and place it at the root of the site.

What it does

  • Writes one User-agent line per crawler in a group, followed by its Allow, Disallow and optional Crawl-delay lines, with a blank line between groups and the Sitemap lines at the end.
  • Writes an empty Disallow: for a group with no paths, which permits everything.
  • Adds a leading slash to a path that lacks one, removes the domain from a pasted URL, and percent-encodes spaces and non-ASCII characters. The * and $ pattern characters are kept.
  • The AI preset blocks GPTBot, ChatGPT-User, OAI-SearchBot, ClaudeBot, anthropic-ai, CCBot, Google-Extended, PerplexityBot, Bytespider, Amazonbot, Applebot-Extended, meta-externalagent and cohere-ai, and leaves every other crawler allowed.
  • Leaves out a crawl delay that is not a number and a sitemap that is not an absolute URL, and says so.
  • Does not test rules against your URLs, read your existing file, or check that a sitemap exists. It cannot stop a crawler that ignores robots.txt, and a disallowed page can still be indexed if other sites link to it.

Example

User-agent: GPTBot
User-agent: CCBot
Disallow: /

User-agent: *
Allow: /admin/help/
Disallow: /admin/

Sitemap: https://example.com/sitemap.xml

Privacy

The file is assembled in the browser. No request is made: your paths and sitemap URLs are not sent anywhere or fetched, and nothing is stored.

Frequently asked questions

How do I block AI crawlers with robots.txt?
Add a group that names each crawler, such as GPTBot, ClaudeBot, CCBot, Google-Extended and PerplexityBot, followed by Disallow: /. Compliance is voluntary: the operators of these crawlers say they follow the file, but robots.txt cannot enforce anything.
Where does the robots.txt file go?
At the root of the host, so that it is served at https://example.com/robots.txt. Crawlers do not look for it in subfolders, and each subdomain needs its own file.
Does Disallow in robots.txt remove a page from Google?
No. Disallow stops crawling, not indexing: a blocked URL can still appear in results, without a description, if other pages link to it. To keep a page out of the index, let it be crawled and give it a noindex robots meta tag or header.
Does Google follow Crawl-delay?
No. Googlebot ignores the Crawl-delay line and decides its own crawl rate. Some other crawlers, Bingbot among them, read it as the number of seconds to wait between requests.