Command Palette

Search for a command to run...

RO

Robots.txt Generator

Build, validate, and test a robots.txt file - user-agent groups, allow/disallow rules, sitemaps, AI crawler blocking, and a live URL tester

Presets:

User-agent group 1

Crawlers
*
Disallow
Allow

User-agent group 2

Crawlers
GPTBotClaudeBotCCBot
Disallow
Allow
Sitemap URLs

robots.txt

User-agent: *
Disallow: /admin/
Disallow: /cart
Disallow: /*?sessionid=
Allow: /admin/public/

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

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

Upload this to the root of your domain so it is served at /robots.txt.

Validation

0 errors · 1 warning
  • Line 10: `Disallow: /` blocks the whole site for "GPTBot, ClaudeBot, CCBot". That is intentional when refusing a specific crawler - just confirm it is the agent you meant.

Test a URL

Allowed - `Allow: /admin/public/` in the "*" group is the longest matching rule for /admin/public/style.css, so it is crawlable.

The longest matching path pattern wins, and Allow beats Disallow on a tie - the same precedence real crawlers use.

Known crawlers

Click Block to add a group that refuses a crawler outright. Compliance is voluntary - this stops cooperative bots, not scrapers.

TokenWhat it isAction
GooglebotGoogle Search's main web crawler. Blocking it removes you from Google over time.
Googlebot-ImageCrawls images for Google Images. Block it to keep photos out of image search.
BingbotMicrosoft Bing's crawler. Also feeds Bing-powered results in other products.
DuckDuckBotDuckDuckGo's own crawler for its instant answers and index.
BaiduspiderBaidu's crawler, the dominant search engine in China.
YandexBotYandex's crawler, the leading search engine in Russia.
SlurpYahoo's legacy crawler. Still used for some Yahoo verticals.
ApplebotApple's crawler, powering Siri and Spotlight Suggestions.
TwitterbotFetches link preview cards for X/Twitter. Blocking it kills your share previews.
facebookexternalhitFetches Open Graph previews for Facebook, Messenger, and WhatsApp.
GPTBotAIOpenAI's crawler that collects public web content used to train its models.
ClaudeBotAIAnthropic's crawler for gathering training data for Claude.
PerplexityBotAIPerplexity's crawler, used to index pages its answer engine cites.
CCBotAICommon Crawl's bot. Its public corpus is a common source of AI training data.
Google-ExtendedAIControls whether Google may use your content for Gemini and Vertex AI training. It does not affect Google Search ranking or indexing.
BytespiderAIByteDance's crawler, associated with TikTok and its AI products.
anthropic-aiAILegacy Anthropic token. Harmless to keep alongside ClaudeBot for older references.
Category:seo
Mode:Offline
Version:1.0.0
Access:Free

What is a Robots.txt Generator?

Robots.txt Generator interface on Toolz.dev - Build, validate, and test a robots.txt file - user-agent groups, allow/disallow rules, sitemaps, AI crawler blocking, and a live URL tester

A Robots.txt Generator builds the plain-text file that sits at the root of your domain and tells crawlers which parts of your site they may fetch. The format looks simple - a `User-agent:` line followed by `Allow:` and `Disallow:` rules - but the details bite: rules only apply inside a group, paths must begin with a slash, `*` and `$` behave in specific ways, and a single stray `Disallow: /` under `User-agent: *` can pull an entire site out of Google. This tool builds the file from a structured form so the syntax is correct by construction.

It does three jobs beyond generation. It lints the file it builds and flags the real footguns: relative paths, a bare `Disallow:` that silently means "allow everything", sitemap URLs that are not absolute, a very high Crawl-delay and blanket blocks, and notes when one crawler is split across two groups. It parses an existing robots.txt back into editable groups, so you can paste what is live today and fix it. And it tests a URL against your rules with the same longest-match precedence real crawlers use - the most specific matching pattern wins, Allow beats Disallow on ties, and groups naming the same crawler are combined - so you can prove a page is reachable before you deploy.

As a robots.txt file generator, the page opens on a worked example. The `User-agent: *` group disallows /admin/, /cart and /*?sessionid= and allows /admin/public/, and a second group refuses GPTBot, ClaudeBot and CCBot with `Disallow: /`. Test /admin/public/style.css as Googlebot and the result is Allowed, because `Allow: /admin/public/` is the longest matching rule. Change the path to /admin/settings and it flips to Disallowed by `Disallow: /admin/`. The validator shows one warning, confirming the `Disallow: /` is meant for those three crawlers. This free robots.txt generator needs no signup.

One thing worth stating plainly: robots.txt controls crawling, not indexing, and it is not a security boundary. A blocked URL can still appear in search results if other pages link to it, because Google can index a URL it has never fetched. To keep a page out of the index you need a `noindex` meta tag or an X-Robots-Tag header - which the crawler can only see if it is allowed to fetch the page. And the file is public: anyone can read yours at /robots.txt, so listing a secret directory there advertises it. Use authentication for anything private.

How to use the Robots.txt Generator?

1

Start from a preset or paste your current file

Pick a preset - Allow everything, Block everything, WordPress, Shopify, Next.js, or Block AI crawlers - to fill the form in one click, or paste your live robots.txt and let the tool parse it back into editable groups.

2

Build your user-agent groups

Add a group per crawler or set of crawlers, choosing from the known-bot list or typing a token. Give each group its Disallow and Allow paths, and a Crawl-delay if the engine you are targeting honours one.

3

Add sitemaps and read the validator

Add one or more absolute sitemap URLs. The validator runs on every keystroke and reports errors, warnings and notes, with a line number where one line is at fault. Fix anything red before you ship, and replace the example.com sitemap URL the presets put in.

4

Test a URL, then copy or download

Enter a path and a user-agent to see Allowed or Disallowed and exactly which rule decided it. When it behaves the way you expect, copy the file or download robots.txt and upload it to your domain root.

Key Features

Real Longest-Match URL Tester

Tests any path against any user-agent using RFC 9309 precedence - the longest matching pattern wins, Allow breaks ties - and names the exact rule that decided it

Built-in Validator

Catches relative paths, empty Disallow and Allow lines, non-absolute sitemap URLs, a Crawl-delay over 30 seconds, and a blanket Disallow: / that would drop your site from search

One-Click Presets

Allow everything, Block everything, WordPress, Shopify, Next.js, and Block AI crawlers each fill the whole form with a sensible, correct starting point

AI Crawler Controls

Block GPTBot, ClaudeBot, PerplexityBot, CCBot, Google-Extended, Bytespider, and anthropic-ai in one click while keeping search engines fully welcome

Frequently Asked Questions

It must live at the root of the host it applies to, served at exactly /robots.txt - for example https://example.com/robots.txt. Crawlers do not look anywhere else. A file at /blog/robots.txt is ignored, and robots.txt on example.com does not govern shop.example.com or the http:// version if you serve one; each host and scheme needs its own file. Serve it as text/plain with a 200 status.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!

robots.txt generatorrobots.txt file generatorfree robots.txt generatorrobots.txt generator freerobots.txt testerblock ai crawlersdisallow googlebotrobots txt validatorcrawl delayuser-agent directiveseo crawl controlblock gptbotsitemap directive