All Tools

Robots.txt Generator

Create a robots.txt file

Presets

Custom

Output

Advertisement Space
Robots.txt Generator: A robots.txt generator creates a valid robots.txt file that tells search engine and AI crawlers which parts of your site they may access. Choose allow/disallow rules and your sitemap URL, then copy the ready file for your site root.

Frequently Asked Questions

What is a robots.txt file?
robots.txt is a plain-text file in your site's root that gives crawling instructions to bots. It uses User-agent, Allow and Disallow rules to control which paths search engines may crawl.
Does robots.txt block a page from Google?
No. robots.txt controls crawling, not indexing. To keep a page out of search results, use a noindex meta tag instead, since a disallowed page can still be indexed if linked elsewhere.
How do I allow AI crawlers in robots.txt?
Add User-agent lines for bots such as GPTBot, ClaudeBot, PerplexityBot and Google-Extended with Allow: /. This generator can include those AI crawler rules for you.
Where do I put the robots.txt file?
Place it at the root of your domain so it is reachable at https://yoursite.com/robots.txt. Crawlers check this exact location before crawling.
📤 Share This Tool
Found this useful? Share with friends!

robots.txt: every directive, and the three that do not work

robots.txt controls crawling, not indexing. A page blocked by Disallow can still appear in search results if other sites link to it — Google just shows it without a description. To keep a page out of the index you need a noindex meta tag or X-Robots-Tag header, and the page must stay crawlable for the crawler to see it.

Supported directives

DirectiveWhat it doesHonoured by Google?
User-agent:Opens a block that applies to a named crawler, or * for allYes
Disallow:Path prefix the crawler should not fetchYes
Allow:Carves an exception out of a broader DisallowYes
Sitemap:Absolute URL of a sitemap; applies site-wide, not per blockYes
Crawl-delay:Seconds to wait between requestsNo — ignored. Bing and Yandex honour it
Noindex:Was an unofficial Google extensionNo — dropped 1 September 2019
Host:Preferred mirrorNo — Yandex only, now deprecated

Wildcards

PatternMeaningExample
*Any sequence of charactersDisallow: /*?sort= blocks every sorted URL
$End of URLDisallow: /*.pdf$ blocks PDFs but not /file.pdf?x=1
/ aloneThe entire siteDisallow: / blocks everything
empty Disallow:Nothing is blockedEquivalent to allowing all

Precedence rules that trip people up

  1. The most specific matching rule wins, measured by path length — not the order the rules appear in. Allow: /blog/public/ beats Disallow: /blog/ for that subdirectory.
  2. If an Allow and a Disallow of equal length both match, the least restrictive rule (Allow) wins.
  3. A crawler obeys only the most specific User-agent block that names it. If User-agent: Googlebot exists, Googlebot ignores the * block entirely — you must repeat any shared rules inside its block.
  4. Matching is case-sensitive on the path and the file must live at the domain root. example.com/blog/robots.txt is not read.
  5. A missing robots.txt (404) means everything is allowed. A 5xx response means Google may treat the whole site as disallowed for a period — a server error on this one file is genuinely dangerous.

AI crawler user agents

User-agentOperatorPurpose
GPTBotOpenAITraining data collection
OAI-SearchBotOpenAIChatGPT search index
ChatGPT-UserOpenAILive fetch when a user asks about a URL
ClaudeBotAnthropicTraining data collection
Claude-SearchBotAnthropicSearch indexing
PerplexityBotPerplexitySearch index
Google-ExtendedGoogleGemini training opt-out — does not affect Search ranking
Applebot-ExtendedAppleApple Intelligence training opt-out
CCBotCommon CrawlOpen crawl corpus many models train on
meta-externalagentMetaAI training
BytespiderByteDanceAI training

A worked robots.txt

A typical content site that wants search traffic and AI citations

User-agent: * then Disallow: /admin/, Disallow: /*?sessionid=, Allow: /

A separate block naming each AI crawler you want to permit, repeating the same Disallow lines

A final Sitemap: https://example.com/sitemap.xml line outside any block

Blocking AI crawlers keeps you out of AI answers. If citations in ChatGPT or Perplexity are a goal, those user agents have to be allowed.

Testing before you ship

Test with a parser that implements the real specification. Python’s built-in urllib.robotparser does not support the * and $ wildcards and will report false failures on any modern file — use a Google-compatible parser such as protego, or the robots.txt report in Search Console. Then confirm live: fetch a blocked URL with the crawler’s user agent and check what actually comes back, because a CDN or edge firewall can block a bot long before your robots.txt is consulted.

More questions people ask

Does robots.txt stop a page being indexed?

No. It stops crawling. A disallowed URL can still be listed in search results, without a snippet, if other pages link to it. To exclude a page from the index use a noindex meta tag or X-Robots-Tag header, and leave the page crawlable so the directive is actually seen.

Is Crawl-delay supported by Google?

No. Google ignores Crawl-delay entirely and manages its own crawl rate. Bing, Yandex and Seznam do honour it. To slow Googlebot, use the crawl rate settings in Search Console or return 503 responses under load.

How do I block AI crawlers?

Add a User-agent block for each one — GPTBot, ClaudeBot, PerplexityBot, CCBot, Google-Extended, Applebot-Extended and others — with Disallow: /. Be aware that this also removes you from AI answer engines, so it is a trade-off between training-data control and citation visibility.

Where does robots.txt have to be located?

At the root of the host, as https://example.com/robots.txt. It applies to that exact host and port only, so a subdomain needs its own file, and one placed in a subdirectory is never read.

What happens if robots.txt returns a server error?

Google treats a persistent 5xx as a signal that the whole site may be disallowed and can stop crawling. A 404 is safe and means everything is allowed. Never let this file depend on a database or an application server.

Everything on this page runs in your browser — nothing you type is uploaded or stored.

Answers, not just a number

Short, exact answers to the questions people ask alongside this tool — the number first, then the working.

For teams, not just visitors

Want this calculator on your own site?

We build the calculators on SnoopTool as embeddable widgets in your branding, wired to your own lead form — the same maths, your colours, your domain, your leads. Tell us which one and we will send back a working demo you can put in front of your team.

One reply from a person, within one business day. No newsletter, no sequence. See our privacy policy.