Robots.txt Generator
Build a correct robots.txt from a preset, fine-tune the paths, and decide bot by bot which of the 8 AI crawlers may read your site. Live preview, then copy or download the file. Everything runs in your browser.
Start from a preset
AI crawlers
Checked means blocked: the file gets a User-agent group for that bot with Disallow: /. Training bots can be blocked without losing AI search visibility. Search and user-request bots cannot.
Paths and sitemap
Your robots.txt
User-agent: * Disallow:
When it is live, run it through the robots.txt tester to confirm the directives parse.
Short answer
robots.txt is a plain text file at the root of a domain, at exactly /robots.txt, that tells crawlers which paths they may request. It controls crawling, not indexing: a blocked page can still be indexed from links pointing at it, so keeping a page out of search takes a noindex tag instead. Directives are grouped per user agent, with Disallow and Allow lines under each group. In 2026 the same file also decides which of the 8 major AI crawlers can read your site, and the decision splits in two: blocking training crawlers like GPTBot, ClaudeBot and Google-Extended costs no visibility, while blocking search crawlers like OAI-SearchBot, Claude-SearchBot and PerplexityBot removes you from AI answers.
What robots.txt controls, and what it does not
robots.txt answers exactly one question: may this crawler request this path. That is a narrower job than most people assume, and the gap between what the file does and what it is expected to do produces most of the damage done with it.
The big one is indexing. Blocking a URL here stops crawlers fetching it, but Google can still index the URL from links elsewhere, listed as a bare link with no description. Worse, if you want a page deindexed, blocking it is counterproductive: Google has to crawl the page to see the noindex tag, and the block hides the very instruction you need it to read. Crawl control and index control are different levers, and this file only pulls the first.
Three more mistakes worth ruling out before you deploy anything:
- Blocking CSS and JavaScript directories. Google renders pages the way a visitor sees them. Block the stylesheets or scripts and it renders a broken page and judges what it sees. This was standard advice a decade ago and has been wrong for most of that time.
- Shipping a staging Disallow: / to production. One line built to keep a staging site private will stop the whole production site being crawled, and it is usually discovered weeks later by someone asking where the traffic went.
- Listing secret paths. The file is public at a predictable URL, and scrapers read it specifically to find interesting directories. Listing /admin here is closer to publishing a map than locking a door. Anything private needs authentication.
A missing file is fine
No robots.txt means every crawler assumes full access, which for many sites is the right policy anyway. Generate one when you have something to say: paths to keep crawlers out of, a sitemap to declare, or an AI crawler decision to make explicit.
The directives, and what each one does
The format has stayed small. Five directives and two wildcard characters cover everything this generator emits and nearly every file you will meet in the wild.
| Directive | What it does | Worth knowing |
|---|---|---|
| User-agent | Starts a group and names the crawler it applies to | A crawler uses the most specific group naming it and ignores the rest, including the * wildcard group |
| Disallow | Blocks paths beginning with the given value, within its group | An empty Disallow: allows everything. Disallow: / blocks the entire site for that group |
| Allow | Carves an exception out of a broader Disallow | The longer matching rule wins, which is how /wp-admin/admin-ajax.php stays open inside a blocked /wp-admin/ |
| Sitemap | Declares the absolute URL of an XML sitemap | Sits outside any group. Google can learn it from Search Console too, but other crawlers rely on this line |
| Crawl-delay | Asks a crawler to pause between requests | Ignored by Google, which manages crawl rate in Search Console. Read by Bing and Yandex |
| * and $ wildcards | * matches any run of characters, $ anchors the end of a URL | Pattern extensions supported by Google and Bing, so /*?sort= and /*.pdf$ work there but may not everywhere |
The Sitemap line is the one directive that helps crawlers find things rather than blocking them. If you do not have a sitemap yet, the sitemap generator builds one, and if you are not sure where your CMS already publishes one, the sitemap finder will locate it.
Search AI bots and training AI bots are different decisions
The AI companies split their crawlers deliberately: one user agent gathers content for model training, another fetches pages to answer a user's question right now. Blocking the first is a licensing decision that costs you nothing in visibility. Blocking the second removes your content from the answers people actually read. The generator labels each of the 8 bots so the two decisions stay separate.
| User agent | Operator | Purpose | Cost of blocking |
|---|---|---|---|
| GPTBot | OpenAI | Model training | None to visibility. Your content is not used for training |
| OAI-SearchBot | OpenAI | ChatGPT search results | Your content stops appearing in ChatGPT answers |
| ChatGPT-User | OpenAI | Live user requests | ChatGPT cannot read your pages when a user asks about them |
| ClaudeBot | Anthropic | Model training | None to visibility. Your content is not used for training |
| Claude-SearchBot | Anthropic | Claude search results | Your content stops appearing in Claude answers |
| Claude-User | Anthropic | Live user requests | Claude cannot read your pages when a user asks about them |
| PerplexityBot | Perplexity | Perplexity answers | Your content stops appearing in Perplexity answers |
| Google-Extended | Google Gemini | Gemini training | None to Google Search. Googlebot is a separate crawler |
The common middle position, and the one the Block AI training bots preset encodes, is to block GPTBot, ClaudeBot and Google-Extended while leaving the search and user-request bots allowed. You keep every AI answer citation and opt out of training. Plenty of sites currently run the opposite configuration without having chosen it, because a plugin or a security template shipped a blanket AI block. The robots.txt tester will show you which camp your current file is in.
How to create and deploy a robots.txt
Six steps from preset to verified live file. The second one is where most files go wrong in 2026, because it is the decision most sites have never consciously made.
- 01
Pick the preset closest to your setup
Allow everything is the right starting point for most sites. WordPress adds the admin block with the admin-ajax.php exception, ecommerce blocks cart, checkout, account and the internal search and filter URLs. Every preset can be fine-tuned afterwards.
- 02
Decide the AI bot policy deliberately
Training crawlers (GPTBot, ClaudeBot, Google-Extended) and search crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot) are separate user agents. Blocking training does not remove you from AI answers. Blocking search does. Toggle each of the 8 bots on its own row rather than inheriting someone else's default.
- 03
Add the paths that waste crawl budget
Internal search results, filter and sort URL variants, and cart or checkout flows generate near-infinite URLs with nothing worth indexing on them. One Disallow line per pattern keeps crawlers spending their budget on pages you want ranked.
- 04
Add the Sitemap line
One line with the absolute URL of your XML sitemap, and the tool places it after the user-agent groups. Google can also learn the sitemap from Search Console, but other search engines and AI crawlers rely on this directive to find it.
- 05
Upload the file to the root of your domain
The file must be reachable at exactly /robots.txt, as in example.com/robots.txt. A copy in a subdirectory is ignored by every crawler, and each subdomain needs its own file.
- 06
Test the live file
Fetch your domain in the robots.txt tester at /tools/robots-txt-tester and confirm the directives parse, the right bots show as allowed or blocked, and the sitemap is picked up. A typo in a user-agent name fails silently, so verify rather than assume.
Verify, do not assume
A robots.txt failure is silent: a misspelled user-agent name or a path in the wrong casing simply does nothing. After deploying, fetch your domain in the robots.txt tester and read back which crawlers are allowed, which are blocked, and whether the sitemap was found. The pair of tools closes the loop: build the file here, prove it there.
What this tool generates
Six presets
Allow everything, WordPress, ecommerce, block AI training bots, block all AI bots, staging
Per-bot AI toggles
One row for each of the 8 AI crawlers, blocked or allowed individually
Search vs training labels
Every bot labelled by operator and purpose, so you know what blocking it costs
Custom disallow paths
One path per line, validated inline before it reaches the file
Sitemap directive
An absolute URL, validated and placed after the user-agent groups
Live preview
The file regenerates on every change, formatted with one blank line between groups
Copy or download
Copy the file to your clipboard or download robots.txt ready to upload
Runs in your browser
Pure client-side generation. Nothing you type leaves the page
Generate here, verify there
Frequently asked questions
What is robots.txt?
A plain text file at the root of a domain that tells crawlers which paths they may request. Rules are grouped by User-agent, with Disallow and Allow directives under each group, and in 2026 the same file governs both search engine crawlers and the 8 major AI crawlers. The file is public, so anyone can read yours.
Where does robots.txt go?
At the root of the host, exactly /robots.txt, as in example.com/robots.txt. A copy in a subdirectory is ignored by every crawler, and each subdomain needs its own file, so blog.example.com does not inherit the one on example.com.
Does robots.txt stop a page being indexed?
No. It controls crawling only. A URL blocked in robots.txt can still appear in search results if other pages link to it, listed without a description because Google was never allowed to read it. To keep a page out of the index, use a noindex tag and leave the page crawlable so Google can see the tag.
Should I block GPTBot?
Only if you have decided you do not want your content used for OpenAI's model training, because that is all GPTBot does. Blocking it does not remove you from ChatGPT answers: those are fetched by OAI-SearchBot and ChatGPT-User, which are separate user agents. If your content is the product, blocking GPTBot is a defensible licensing decision that costs no search visibility.
Will blocking AI bots remove me from ChatGPT answers?
It depends which bots you block. Blocking the training crawlers (GPTBot, ClaudeBot, Google-Extended) does not affect AI answers at all. Blocking the search-side crawlers (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot) removes your content from ChatGPT, Claude and Perplexity answers respectively. The user agents are split precisely so you can make the two decisions separately.
Do I need a robots.txt at all?
Not strictly. A missing file means every crawler assumes full access, which is often exactly what a small site wants. The reasons to have one anyway are the Sitemap directive, keeping crawl budget off worthless URL patterns, and making your AI crawler policy explicit rather than accidental.
What does User-agent: * mean?
It is the wildcard group that applies to any crawler without a group of its own. A crawler that finds a group naming it specifically uses that group and ignores the wildcard entirely, which is why blocking an AI bot takes its own User-agent group rather than a line added under the asterisk.
Why does the WordPress preset allow admin-ajax.php?
Because blocking all of /wp-admin/ would also block /wp-admin/admin-ajax.php, which many themes and plugins call from the public front end. The Allow line carves that one file back out, and Google honours it because the more specific match wins. Without it, blocked AJAX requests can break how Google renders your pages.
What is Crawl-delay, and does Google respect it?
Crawl-delay asks a crawler to wait a number of seconds between requests. Google ignores it entirely and asks you to manage crawl rate in Search Console instead. Bing and Yandex do honour it, so it is harmless to include for them, but it is not a way to slow Googlebot down.
Can I put comments in robots.txt?
Yes. Anything after a # on a line is a comment and every crawler ignores it. Comments are useful for recording why a rule exists, which matters in a file that tends to outlive the person who wrote it.
How do wildcards work in robots.txt?
Google and Bing support * for any sequence of characters and $ to anchor the end of a URL. So Disallow: /*?sort= blocks any URL containing ?sort=, and Disallow: /*.pdf$ blocks URLs ending in .pdf. These are extensions to the original standard, so smaller crawlers may not honour them.
Is robots.txt case-sensitive?
Paths are. Disallow: /Cart does not block /cart, so write rules in the casing your URLs actually use. Directive names and user-agent names are matched case-insensitively, so user-agent: gptbot works, but the convention is to write them as documented.
How quickly do robots.txt changes take effect?
Google caches robots.txt and refreshes its copy roughly daily, so a change can take about a day to be honoured. Other crawlers follow similar schedules. Uploading a fix does not retroactively unblock anything until the crawler next re-reads the file.
Other crawl and indexing tools
Website URL Extractor
Crawl any website and download every URL it links to as CSV, TXT, or JSON. Works straight from the live site, no sitemap required.
Use toolRedirect Chain Checker
Trace every redirect hop with status codes and response times. Detect loops, long chains, protocol downgrades, and 302 misuse.
Use toolPage Indexability Checker
Find out why a page is not indexed. Checks status codes, noindex tags and X-Robots-Tag headers, robots.txt rules, canonicals, sitemap membership, and rendered content.
Use toolBroken Link Checker
Find broken internal and external links on any page. Checks up to 50 links for 404 errors, redirects, and timeouts.
Use toolRobots.txt Tester
Analyze robots.txt to see which AI crawlers and search engines are blocked, find sitemaps, and identify access issues.
Use toolKnow whether crawlers can actually reach your pages
robots.txt is one input to crawl access, alongside every meta robots tag, header and canonical on the site. CrawlRaven joins your crawl, Search Console and GA4 into one ranked plan, and its 200-point audit includes AI-readiness checks like crawler access, so a blocked bot never goes unnoticed.