robots.txt Generator
Easily generate a robots.txt file to manage web crawlers, featuring a one-click preset to block AI bots from training on your content.
Rule Syntax Summary
| Directive | Meaning | Example |
|---|---|---|
| User-agent | Bot name to apply rules to. * applies to all others | User-agent: Googlebot |
| Disallow | Path to disallow crawling. Empty value means "no disallowance" | Disallow: /admin/ |
| Allow | Exception to allow within a blocked range | Allow: /admin/help.html |
| * | Wildcard matching any string | Disallow: /*.pdf |
| $ | Anchors to the end of the URL | Disallow: /*.pdf$ |
| Sitemap | Absolute URL of the sitemap. Common for all bots | Sitemap: https://example.com/sitemap.xml |
| Crawl-delay | Request interval (seconds). Ignored by Google, referenced by Bing/Yeti | Crawl-delay: 10 |
What is the robots.txt Generator?
A robots.txt file is a simple but powerful guide for web crawlers, placed at your site's root (e.g., `example.com/robots.txt`). It tells bots like Googlebot which pages to avoid, such as admin panels or shopping carts, and where to find your sitemap. With the rise of AI, there's a growing need to block crawlers like GPTBot and CCBot from using site content for training. This generator simplifies that with a one-click preset for blocking major AI bots. It also helps prevent critical errors by warning you if you're about to block your whole site. All generation happens in your browser, so your rules are never sent to our servers.
How to use
- Start by choosing a `Default Policy`: `✅ Allow All`, `🤖 Block AI Crawlers Only`, or `⛔ Block All`.
- Under `Select Bots to Block`, check any specific crawlers you wish to block entirely. Use the `Block All` button to quickly block all listed AI bots.
- Add paths to exclude from crawling in the `Disallow Paths` box, one per line (e.g., `/admin/`). Use `Allow Paths (Exceptions)` for sub-paths you want to re-allow.
- Enter the full URL of your sitemap in the `Sitemap URL(s)` box (e.g., `https://example.com/sitemap.xml`).
- Review the live `robots.txt Preview` on the right. When ready, click `Save` to download the file and upload it to your website's root directory as `robots.txt`.
robots.txt Generator guide
How this tool is used in real work, and what to watch out for.
Disallow Is a Request, Not a Block
Most accidents involving robots.txt happen because of two common misunderstandings. You need to keep them separate.
First, `Disallow` is a request to "please don't crawl this path," not "please remove this from search results." A crawler won't read the page, but if another site links to that URL, Google can still show it in search results with just the URL and no content. This is what Search Console reports as "Blocked by robots.txt, but indexed."
Second, this is where the real trouble starts. To get a page out of search, you add a `noindex` meta tag to it, and then you also block it with `robots.txt`. The crawler can't read the page, so it can't read the `noindex` tag. As a result, the page is never removed from the index. You should never use `noindex` and `Disallow` together.
| Goal | What to Use | robots.txt Disallow |
|---|---|---|
| Completely remove from search | `noindex` meta tag (or X-Robots-Tag header) | Don't use — it prevents reading the tag |
| Reduce crawl load / duplicate URLs | `Disallow` | This is its intended purpose |
| Protect private content | Login/Authentication (401/403) | Useless — you're just advertising the path's existence |
| Clean up deleted pages | 410 Gone response | If you block it, the crawler can't get the deletion signal |
| Clean up duplicate pages | `canonical` tag | If you block it, the crawler can't read the canonical tag |
Blocking AI Crawlers: What to Block and What to Allow
Blocking all AI bots isn't always the right answer. Bots from the same company often have different roles. The most common strategy is to block data collection for training while allowing bots used for search and citations.
| Bot | What It Does | If You Block It |
|---|---|---|
| GPTBot | Collects data for OpenAI model training | Excluded from training. Almost no loss of inbound traffic. |
| OAI-SearchBot | Indexes for ChatGPT search results | Excluded from ChatGPT search results and citations. |
| ChatGPT-User | Opens a link when given by a user | When a user asks about your link, ChatGPT can't read it. |
| Google-Extended | Controls usage for Gemini training | Excluded from training only. No impact on Google search rank or indexing. |
| CCBot | Common Crawl — many AIs use this data | Excluded from a broad training dataset. |
| PerplexityBot | Collects and cites for Perplexity answers | You lose citation traffic. |
robots.txt Is Not Enforceable
robots.txt is a gentlemen's agreement. It's up to the bot to honor it. While major companies (OpenAI, Anthropic, Google, Naver) have stated their crawlers respect the rules, many bots don't read the file at all, spoof their User-Agent, or change their names frequently. To truly block a bot that keeps showing up in your access logs, you have to block it at the server level.
# nginx — How to actually block bots that ignore robots.txt
# Using 444 (closes connection without response) also saves bandwidth.
map $http_user_agent $bad_bot {
default 0;
~*(GPTBot|CCBot|Bytespider|AhrefsBot|SemrushBot) 1;
}
server {
# ... snip ...
if ($bad_bot) { return 444; }
}
# Test config before applying → Reload for zero-downtime update
# nginx -t && systemctl reload nginx
Where to Upload and How to Verify
Even with perfect syntax, your robots.txt is useless if it's in the wrong place. It must be at the root of your domain, and each subdomain needs its own file.
- After uploading the downloaded file to your site's root, open https://yourdomain/robots.txt directly in your browser. If you see a 404 error or an HTML page, it's in the wrong place.
- Check the robots.txt report in Google Search Console to see the latest version Google has read and any errors it found.
- Use the robots.txt validation tool in Naver Search Advisor to check against Yeti's standards as well.
- https://example.com/blog/robots.txt → Is ignored. Placing it in a subfolder has no effect.
- https://blog.example.com/ → Is not covered by example.com's robots.txt. You must upload a separate file for each subdomain.
- The filename must be exactly `robots.txt` (lowercase). `http` and `https` are also treated as separate sites, so if you serve both, the file should be accessible on both.
Frequently asked questions
If I disallow a page, will it disappear from search results?
Not always. `Disallow` only stops crawling. If other sites link to the page, its URL can still be indexed. To guarantee removal, use a `noindex` meta tag on the page itself and ensure robots.txt allows crawling so the tag can be read.
Is blocking AI crawlers with robots.txt legally binding?
No, robots.txt is a voluntary standard. Major companies like OpenAI and Google state they respect it, but non-compliant bots will ignore it. True blocking requires server-level configuration (e.g., in nginx or .htaccess).
Where do I upload the generated robots.txt file?
It must be placed in the root directory of your domain. For `https://example.com`, the correct location is `https://example.com/robots.txt`. A file at `https://example.com/blog/robots.txt` will be ignored.
Are my site paths and rules sent to your server?
No. This tool runs entirely in your web browser. All rule generation and file creation happen on your computer. Nothing you type is ever transmitted or stored, ensuring your site's structure remains private.