Robots.txt generator

robots.txt tells crawlers which paths on your site they may fetch; it does not keep a page out of search results on its own. Choose your rules, add your sitemap, decide what each AI crawler may do, and copy or download the file for your site's root.

Written as the User-agent: * group, which every crawler without a group of its own follows.

One path per line, starting with /. * matches any characters and $ marks the end, so /*.pdf$ matches every PDF. Paths are case-sensitive.

Optional. Must be the full URL, including https://.

Collects content that may be used to train OpenAI's generative AI foundation models.

Finds sites to show in ChatGPT's search features.

Visits a page when a ChatGPT user or a Custom GPT asks for it.

Collects web content that could contribute to training Anthropic's generative AI models.

Reads web content to improve the quality, relevance and accuracy of search results for users.

Fetches a page when a Claude user asks a question that needs it.

Not a crawler: a robots.txt token that controls whether content Google crawls may be used to train Gemini models and for grounding.

Not a crawler: a robots.txt token that controls whether Apple may use your content to train its generative AI models.

Surfaces and links sites in Perplexity's search results. Perplexity says it is not used to crawl content for AI foundation models.

Fetches a page when a Perplexity user asks a question.

Crawls the web for Common Crawl's open repository of web crawl data.

robots.txt

User-agent: *
Allow: /

Sitemap: https://www.example.com/sitemap.xml
Default for all crawlers
Allow everything
Crawlers blocked by name
None
Crawlers allowed by name
None
Sitemap
https://www.example.com/sitemap.xml
File size
69 bytesGoogle reads up to 500 KiB.
  • Upload it as https://www.example.com/robots.txt: crawlers only read robots.txt at the root of a host, and each subdomain needs its own file.

How does a robots.txt file work?

Before crawling a site, a crawler that follows the Robots Exclusion Protocol (RFC 9309, which Google supports) fetches /robots.txt from the root of the host. It looks for the group whose User-agent line names it, and only if there is none does it use the User-agent: * group. Google's crawlers never combine the two, so a crawler with its own group ignores everything in the * group; that is why an allowed crawler's group here repeats your disallowed paths.

Inside a group, the rule with the longest matching path wins, and when an Allow and a Disallow rule match equally, the Allow rule is used. Paths are case-sensitive, * matches any run of characters and a $ at the end means the URL must end there. Disallow: / matches every URL on the site.

robots.txt is a request, not a lock. RFC 9309 says its rules are not a form of access authorization, and Google says it is up to each crawler to obey them. Well-behaved crawlers do; OpenAI says its rules may not apply to ChatGPT-User, and Perplexity says Perplexity-User generally ignores them, because a person asked for the page.

Blocking a URL stops crawling, not indexing. Google says a disallowed URL can still be indexed if other pages link to it, so keep a page out of search with a noindex rule on a page crawlers are allowed to fetch.

User-agent: *          ← every crawler without its own group
Disallow: /admin/      ← don't fetch URLs starting /admin/

User-agent: GPTBot     ← this crawler reads only this group
Disallow: /

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

Which crawlers can a robots.txt file control?

Crawler tokens in this generator, described from each operator's own documentation (checked 2026-10-20)
TokenOperatorWhat the operator says it doesWhat a robots.txt rule does
GPTBotOpenAICollects content that may be used to train OpenAI's generative AI foundation models.Blocking it is OpenAI's signal not to use your content for that training. It is set independently of OAI-SearchBot.
OAI-SearchBotOpenAIFinds sites to show in ChatGPT's search features.Sites that block it are not shown in ChatGPT search answers, though they can still appear as navigational links.
ChatGPT-UserOpenAIVisits a page when a ChatGPT user or a Custom GPT asks for it.OpenAI says robots.txt rules may not apply, because a user started the visit.
ClaudeBotAnthropicCollects web content that could contribute to training Anthropic's generative AI models.Anthropic says its bots honour standard robots.txt directives.
Claude-SearchBotAnthropicReads web content to improve the quality, relevance and accuracy of search results for users.Anthropic says its bots honour standard robots.txt directives.
Claude-UserAnthropicFetches a page when a Claude user asks a question that needs it.Anthropic says its bots honour standard robots.txt directives.
Google-ExtendedGoogleNot a crawler: a robots.txt token that controls whether content Google crawls may be used to train Gemini models and for grounding.Google says it does not affect inclusion or ranking in Google Search. Crawling is done by Google's existing user agents.
Applebot-ExtendedAppleNot a crawler: a robots.txt token that controls whether Apple may use your content to train its generative AI models.Apple says pages that disallow it can still be included in search results.
PerplexityBotPerplexitySurfaces and links sites in Perplexity's search results. Perplexity says it is not used to crawl content for AI foundation models.Perplexity recommends allowing it in robots.txt if you want to appear in its search results.
Perplexity-UserPerplexityFetches a page when a Perplexity user asks a question.Perplexity says it generally ignores robots.txt, because a user requested the fetch.
CCBotCommon CrawlCrawls the web for Common Crawl's open repository of web crawl data.Common Crawl's documented way to stop it is a robots.txt group with Disallow: /.

How to create a robots.txt file

  1. 1
    Choose the defaultAllow all or block all. This becomes the User-agent: * group that every crawler without its own group follows.
  2. 2
    List the paths to keep crawlers out ofType one path per line, starting with /, such as /admin/ or /*.pdf$. Blank lines are ignored.
  3. 3
    Add your sitemap and pick a rule per crawlerPaste the full sitemap URL, then set each crawler to no rule, allow or block.
  4. 4
    Copy or download the fileSave it as robots.txt at the root of your site, then open https://your-domain/robots.txt to check it loads.

Frequently asked questions

Does blocking GPTBot remove my site from ChatGPT answers?
Not from ChatGPT search. OpenAI says GPTBot collects content that may be used to train its models, OAI-SearchBot decides whether a site appears in ChatGPT's search features, and each setting is independent. Sites that block OAI-SearchBot are not shown in ChatGPT search answers, though they can still appear as navigational links.
Where do I put robots.txt?
At the root of the host it covers, named exactly robots.txt, such as https://www.example.com/robots.txt. Crawlers don't look for it in subfolders, and it only applies to the protocol, host and port it is served from, so each subdomain needs its own file.
What does Disallow: / do?
It asks the crawlers that group applies to not to fetch any URL on the site, because every path starts with /. Under User-agent: * it covers every crawler without a group of its own, except Google's AdsBot crawlers, which Google says must be named. URLs that are blocked can still be indexed, without their content, if other pages link to them.
Will robots.txt keep a page out of Google search results?
No. Google says robots.txt is not a way to keep a page out of Google, and a disallowed URL can still be indexed if it is linked from elsewhere. Use a noindex rule instead and leave the page crawlable, because Google can only see noindex on a page it is allowed to fetch.
Does blocking Google-Extended affect my Google Search ranking?
No. Google says Google-Extended does not affect a site's inclusion in Google Search and is not used as a ranking signal. It is a control token rather than a separate crawler, and it only governs whether content Google crawls may be used to train Gemini models and for grounding.

Sources

Related tools

See all 73 free tools

Need a custom dev tool for your team?

We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.

Built by CountryDevs · No signup · No ads · We count visits, never what you enter