A robots.txt generator writes the plain text file that controls which parts of your site crawlers may visit. With our free generator, you choose the crawlers, add Allow and Disallow paths, list your sitemap and download the finished robots.txt file in about a minute. It also has presets for WordPress, online stores, staging sites and blocking AI training crawlers. Further down, you can read what each rule means, which AI crawler token does which job, two worked example files and the mistakes that cost sites traffic.
Each AI company now runs several bots with different jobs. So blocking the wrong token can hide you from AI search when you only meant to stop model training. For that reason, the generator lists each verified token, and you can block one job while keeping the other.
Robots.txt generator
Pick a preset or build your own groups. The file preview updates as you edit.
The file is built in your browser and nothing is uploaded. Upload robots.txt to the root of your site, for example https://www.example.com/robots.txt.
Create Your robots.txt File in Five Steps
You create a robots.txt file with the generator in five steps, and the whole job takes about a minute.
- Type your site address, such as https://www.example.com. The presets use it to fill your sitemap link.
- Pick a preset that matches your site, or keep the blank group.
- Tick the crawlers each group should cover. Then add Allow or Disallow rules with a path.
- Add a crawl-delay only if a crawler that honours it is slowing your server.
- Check the preview and the warnings. Then press Download robots.txt or Copy.
After that, upload the file to the top-level folder of your site. Google reads it only from the root, so https://www.example.com/robots.txt works, while a file at /blog/robots.txt does not count.
What Each robots.txt Rule Means
Each robots.txt rule the generator writes uses one of the four fields Google supports: user-agent, allow, disallow and sitemap. Google ignores other fields, such as crawl-delay. In the file, each group starts with one or more User-agent lines, and then the Allow and Disallow rules for those crawlers follow.
- User-agent names the crawler. Google matches these names without caring about case.
- Disallow blocks a path. Crawlers ignore a Disallow line with no path.
- Allow opens a path inside a blocked folder.
- Sitemap gives the full URL of your XML sitemap.
- A * stands for any run of characters, and a $ marks the end of a URL.
- A # starts a comment.
Paths are case sensitive, though, so Disallow: /Private/ does not block /private/. Also, when two rules clash, Google follows the least restrictive one. Google also picks the group with the most specific user-agent that matches its crawler. As a result, a Googlebot group overrides your * group for Googlebot.
In addition, the file must be UTF-8 plain text. Google stops reading after 500 KiB, so very long files lose their last rules.
Read also: Invoice Generator: Add Tax and Get a Free PDF
Which Token Blocks Which AI Crawler
GPTBot, ClaudeBot, Google-Extended and CCBot are the tokens that block AI training, while OAI-SearchBot, Claude-SearchBot and PerplexityBot are the tokens that control AI search. Most AI companies now split their bots by job, and the generator includes every token in the table.
| Token | Company | What it does | Honours robots.txt |
|---|---|---|---|
| GPTBot | OpenAI | Collects content that may train its AI models | Yes |
| OAI-SearchBot | OpenAI | Finds sites for ChatGPT search results | Yes |
| ChatGPT-User | OpenAI | Visits pages when a user asks ChatGPT | May not apply |
| Google-Extended | Controls use of content for Gemini training and grounding | Yes | |
| ClaudeBot | Anthropic | Collects content that may train its models | Yes |
| Claude-SearchBot | Anthropic | Improves Claude’s search answers | Yes |
| Claude-User | Anthropic | Fetches pages when a user asks Claude | Yes |
| CCBot | Common Crawl | Builds the open Common Crawl dataset | Yes |
| PerplexityBot | Perplexity | Surfaces and links sites in Perplexity search | Yes |
Unlike the others, Google-Extended has no user agent string of its own. Google’s usual crawlers do the fetching, and the token works only as a control. Google-Extended also has no effect on inclusion or ranking in Google Search, so blocking it leaves your Google rankings alone.
For that reason, the block-AI preset covers GPTBot, Google-Extended, ClaudeBot and CCBot, the four tied to model training or open datasets. However, it keeps OAI-SearchBot, Claude-SearchBot and PerplexityBot allowed, because those bring AI search visitors. You can tick them too if you want out of AI search as well. For background on how AI tools pull live pages into answers, read our guide to retrieval-augmented generation.
The WordPress, Online Store and Staging Presets
The generator has three site presets, for WordPress, online stores and staging sites, plus the block-AI preset. The WordPress preset copies the rules WordPress writes on its own. It blocks /wp-admin/ but allows /wp-admin/admin-ajax.php, and it adds /wp-sitemap.xml, the sitemap WordPress has built in.
By contrast, the online store preset blocks /cart, /checkout, /account and /search. Those pages hold each shopper’s own data or search results, so they add nothing to search. Shopify stores work differently, though. Shopify generates its own robots.txt, and you edit it through a robots.txt.liquid template in your theme. Because that template replaces Shopify’s default file, copy only the extra rules you need.
Finally, the staging preset blocks every crawler. So use it only on test sites and never on a live store.
Two Example robots.txt Files
The two example robots.txt files belong to a WordPress bakery that blocks AI training and a small shop that slows down busy crawlers. First, the bakery wants search traffic but no AI training. So it picks the block-AI preset, adds its domain and gets this file:
User-agent: *
Allow: /
User-agent: GPTBot
User-agent: Google-Extended
User-agent: ClaudeBot
User-agent: CCBot
Disallow: /
Sitemap: https://www.northlightbakery.com/sitemap.xml
Googlebot finds no group of its own, so it uses the * group and crawls everything. GPTBot, on the other hand, finds its own group and stays out.
Next, the small shop has a busy server. It adds a second group for Bingbot and CCBot with Crawl-delay: 10. Bingbot honours crawl-delay, and CCBot obeys it too, as does Anthropic’s ClaudeBot. Google ignores the line, though, so to slow Googlebot the shop has to look at its server and hosting.
Common robots.txt Mistakes
The most common robots.txt mistakes are using the file to hide pages, serving an error on its URL and copying a staging block to a live site.
- Robots.txt does not keep a page out of Google. Google may still index a blocked URL if other sites link to it. So use noindex or a password for pages that must stay out of search.
- A server error on robots.txt makes Google pause crawling for up to 12 hours. For that reason, test the file URL after every upload.
- A 404 for robots.txt tells Google there are no limits at all.
- Google merges two groups for the same crawler. To avoid surprises, keep each crawler in one group.
- Copying Disallow: / from a staging site to a live site removes it from crawling.
For updates on how Google crawls sites, our list of Google Search Central events covers the talks where Google explains changes. Also, tag your campaign links with our free UTM builder to see which visits come from where. You can find more free tools on the Bizolaunch tools page.
Read also: 15 Tools for Recovering Deleted Files That Work
Questions Site Owners Ask About robots.txt
Where Do I Put My robots.txt File?
Put your robots.txt file in the top-level folder of your site, so it loads at yourdomain.com/robots.txt. Google ignores robots.txt files in subfolders. Also, a file covers only its own host, so each subdomain needs its own file.
Does Google Follow Crawl-Delay?
No, Google does not follow crawl-delay and ignores the line. However, Bingbot, CCBot and ClaudeBot do read it, so the line still has a use.
How Do I Block ChatGPT From Using My Site?
To block ChatGPT from training on your site, add a group for GPTBot with Disallow: /. Then add OAI-SearchBot as well if you also want out of ChatGPT search. ChatGPT-User visits pages on a user’s request, so robots.txt rules may not apply to it.
Will Blocking Google-Extended Hurt My Google Rankings?
No, blocking Google-Extended will not hurt your Google rankings or your inclusion in Google Search. Instead, it only controls use of your content for Gemini models.
What Happens if My Site Has No robots.txt?
If your site has no robots.txt, Google crawls it without limits. It treats a missing file, or any 4xx error except 429, as if no file existed. Other crawlers that follow the standard behave in a similar way.





















































































































