Skip to content
Free toolRuns in your browser

Robots.txt Generator with AI Bot Presets

Pick a preset, choose which search engines and AI crawlers may crawl your site, add your private paths and sitemap, and copy a valid robots.txt. The recommended preset keeps you in ChatGPT search, Claude, Perplexity and Google while blocking AI training crawlers. The file is built in your browser as you click, with a warning whenever a rule could cost you search traffic.

Start from a preset
Skip to the generated file
AI search and answers

Bots that fetch pages so an assistant or search engine can cite and link to them. Blocking these removes you from those answers.

10 allowed, 0 blocked

  • OpenAI: ChatGPT search

  • Anthropic: Claude search

  • Perplexity: Perplexity search

  • Google: Google Search, AI Overviews and AI Mode(search engine)

  • Microsoft: Bing search(search engine)

  • Apple: Siri, Spotlight and Safari(search engine)

  • DuckDuckGo: DuckDuckGo AI answers

  • Meta: Meta AI search

  • Amazon: Alexa and Amazon search

  • Mistral AI: Mistral search

AI training and open datasets

Bots and control tokens that decide whether your content is collected for model training or public datasets. Blocking them does not remove you from AI search.

0 allowed, 8 blocked

  • OpenAI: OpenAI model training

  • Anthropic: Anthropic model training

  • Google: Gemini training and grounding(control token)

  • Apple: Apple model training(control token)

  • Common Crawl: Common Crawl dataset

  • Meta: Meta AI training

  • Amazon: Amazon products and AI models

  • Mistral AI: Mistral model training

User-triggered fetches

Fetches made because a person asked an assistant to open a page. Several operators say these may ignore robots.txt.

7 allowed, 0 blocked

  • OpenAI: ChatGPT user requests(may ignore robots.txt)

  • Anthropic: Claude user requests

  • Perplexity: Perplexity user requests(may ignore robots.txt)

  • Mistral AI: Mistral user requests

  • Meta: Meta AI user requests(may ignore robots.txt)

  • Amazon: Alexa user requests(may ignore robots.txt)

  • Google: Google AI agents(may ignore robots.txt)

General rules

Applies to every crawler without a group of its own: search engines, the AI bots you allow above and anything not listed here.

One per line. * matches anything and $ marks the end, for example /*.pdf$. Anyone can read robots.txt, so protect private pages with a login instead of listing secret URLs.

Exceptions to the paths above. The longer, more specific rule wins.

The full address. Add more than one on separate lines.

Google and Amazon ignore it. Only add it if a crawler that reads it overloads your server.

Lines starting with # are ignored by crawlers.

Not needed, because unnamed bots follow the * rules. Turn it on to make your intent explicit; they get the same path rules.

robots.txt preview

# robots.txt
# A crawler obeys the group that names it, else the * group.

# Every crawler not named below, search engines included.
User-agent: *
Allow: /

# AI training: blocked from the whole site.
# This does not remove you from AI search answers.
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: meta-externalagent
User-agent: Amazonbot
User-agent: MistralAI-Training
Disallow: /

Checks

  • Warning: No sitemap listed

    Add your sitemap's full URL, for example https://yourdomain.com/sitemap.xml, so crawlers can find every page you want indexed.

Upload the file to the root of your domain so it loads at https://yourdomain.com/robots.txt, one file per subdomain. Google generally refreshes its copy within a day. Then confirm each bot with the AI crawler checker.

1 problem in this robots.txt

Free to use · Updated · By the LightSpeedBolt team

How to use the Robots.txt Generator

  1. Step 1

    Start from a preset

    Allow AI search and block AI training is selected by default. Allow everything, or block all AI crawlers, is one click away.

  2. Step 2

    Adjust each crawler

    Every bot has its own switch, grouped into AI search, AI training and user-triggered fetches. Search engines and control tokens are labelled.

  3. Step 3

    Add paths and your sitemap

    List the areas crawlers should skip, such as /admin or /checkout, and paste your sitemap's full URL.

  4. Step 4

    Copy, upload and verify

    Copy or download the file, upload it so it loads at yourdomain.com/robots.txt, then confirm each bot with the AI crawler checker.

How robots.txt rules work

A robots.txt file sits at the root of a host and holds groups of rules. Each group starts with one or more User-agent lines followed by Disallow and Allow paths. The format is the Robots Exclusion Protocol, standardized as RFC 9309, and Google documents how it reads it:

  • A crawler follows the group that names it most specifically and falls back to User-agent: * only when no group names it. Once you add a group for a bot, that bot ignores your * rules, private paths included.
  • When rules conflict, the most specific rule (the longest path) wins. When an allow and a disallow rule are equally specific, Google uses the less restrictive one.
  • User-agent names are case-insensitive, but paths are case-sensitive: /Admin and /admin are different rules.
  • * matches any run of characters and $ marks the end of a URL, so Disallow: /*.pdf$ blocks every PDF.
  • Sitemap lines must be full URLs, including the protocol and host. They are not tied to any user-agent group, and you can list several.
  • Google supports only user-agent, allow, disallow and sitemap. It ignores crawl-delay and stops reading after the first 500 KiB.

The right robots.txt rules for AI crawlers

AI companies run separate bots for separate jobs, which is why the generator groups them:

  • AI search and answers (OAI-SearchBot, Claude-SearchBot, PerplexityBot and others) fetch pages so an assistant can cite and link to them. Block them and you drop out of those answers.
  • AI training and open datasets (GPTBot, ClaudeBot, CCBot, Google-Extended, Applebot-Extended and others) decide whether your content is collected for model training. OpenAI, Anthropic, Google and Apple document these separately from their search products, so blocking them does not take you out of AI search.
  • User-triggered fetches (ChatGPT-User, Claude-User, Perplexity-User and others) open a page because someone asked. Several operators say these may ignore robots.txt.

For most startups the recommended preset is the sensible default: you stay findable in AI answers, which is where the citations and clicks come from, and you keep a say over training. To block a single training bot, the group is two lines, User-agent: GPTBot and Disallow: /. Google's AI Overviews and AI Mode use Googlebot, so there is no robots.txt rule that removes you from them without removing you from Google Search.

Blocking crawling is not blocking indexing

Disallow stops compliant crawlers from fetching a URL, but Google says it can still index a blocked URL, without its content, if other pages link to it. To keep a page out of search results, let Google crawl it and add a noindex robots meta tag or X-Robots-Tag header, or put it behind a login.

Do not block the CSS and JavaScript files your pages need. Google says that if leaving them out makes a page harder for its crawler to understand, you should not block them.

Common robots.txt mistakes

  • Shipping a staging file. User-agent: * with Disallow: / blocks every crawler from the whole site.
  • Listing secret URLs. Anyone can read robots.txt, so it points people straight at the paths you list. Protect private pages with a login.
  • One file for every subdomain. Rules apply only to the host, protocol and port the file is served from, so blog.example.com needs its own file.
  • A relative sitemap URL. Google requires a fully qualified URL, so Sitemap: /sitemap.xml is not valid. Write the full address.
  • Putting noindex in robots.txt. Google ignores it there. Use the robots meta tag or header instead.
  • Copying a "block every AI bot" list. Many include search bots, which removes you from ChatGPT search, Claude or Perplexity answers you may want.

Where to put the file and how to test it

Upload robots.txt to the top-level directory of each host, so it loads at https://yourdomain.com/robots.txt. Google says it generally caches the file for up to 24 hours, and other crawlers refresh on their own schedules. In Google Search Console, the robots.txt report shows the copy Google fetched and lets you request a recrawl after an important change.

Then run the AI crawler checker on your home page and a few key pages to confirm each bot sees what you intended. If you also want a map of your best pages for AI tools, draft an llms.txt with the llms.txt generator.

Frequently asked questions

How do I block GPTBot with robots.txt?

Add a group with two lines: User-agent: GPTBot and Disallow: /. OpenAI says disallowing GPTBot signals that your content should not be used to train its models, and that this setting is independent of OAI-SearchBot, so your pages can still appear in ChatGPT search.

Can I block AI training but stay in AI search?

Yes, for the companies that run separate bots. You can disallow GPTBot while allowing OAI-SearchBot, disallow ClaudeBot while allowing Claude-SearchBot and Claude-User, and disallow Google-Extended without affecting Google Search. The recommended preset does exactly this.

Should I block all AI crawlers?

Usually not. Blocking AI search bots removes your pages from the answers those assistants give, which is where AI search sends citations and clicks. Blocking only the training bots keeps you findable while opting out of model training. If you do block everything, keep Googlebot and Bingbot allowed or you also lose classic search.

Where do I put robots.txt?

At the root of each host, for example https://example.com/robots.txt. Google applies a file only to the host, protocol and port it is served from, so a file on www.example.com does not cover blog.example.com.

How do I add my sitemap to robots.txt?

Add a line such as Sitemap: https://example.com/sitemap.xml. Google requires the full URL, including the protocol and host. The line is not tied to any user-agent group, you can list several sitemaps, and a sitemap may sit on a different host.

Does robots.txt hide private pages?

No. The file is public and only well-behaved crawlers follow it, so listing secret paths can point people straight to them. Protect private pages with a login, and use noindex for public pages that should stay out of search results.

How long do robots.txt changes take to work?

Google says it generally caches robots.txt for up to 24 hours. OpenAI and Perplexity mention about 24 hours for their bots, and DuckDuckGo says up to 72 hours for DuckAssistBot. In Search Console you can ask Google to recrawl the file after an important change.

Done for you

Want the results without the busywork?

The tools show where you stand. Our plans do the work: backlinks, SEO posts, Reddit and AI search, going live within 72 hours and tracked in one dashboard.