robots.txt Generator
Create a correct robots.txt file for your website — allow or block crawlers, disallow private paths, add your sitemap, and optionally block AI scrapers like GPTBot. Copy or download it in seconds, entirely in your browser.
How to Use
- Pick a starting template: allow everything, block everything, or custom rules.
- For custom, list the paths to disallow (one per line) and any to explicitly allow.
- Add your sitemap URL so search engines can find all your pages.
- Tick any AI or scraper bots you want to block.
- Copy the result or download robots.txt and place it at the root of your site.
Place this file at the root of your site, reachable at /robots.txt.
What robots.txt does
robots.txt is a small plain-text file at the root of your website that tells web crawlers — search engines and other bots — which parts of your site they may and may not fetch. It is the first thing a well-behaved crawler reads when it visits, and it works through a few simple directives: User-agent names which bot a block applies to (* means all), Disallow lists paths the bot should not crawl, Allow carves out exceptions, and a Sitemap line points crawlers to your full list of URLs so they can find everything efficiently. This generator assembles those lines correctly so you do not have to remember the exact syntax.
Two things to get right
First, robots.txt is not security. It is a public file — anyone can read yoursite.com/robots.txt — and it is a polite request, not a lock. So never list secret URLs in it (you would be advertising them), and do not rely on Disallow to keep a page out of search results: a blocked page can still be indexed if other sites link to it. To truly keep a page private, protect it with a login; to keep it out of search, use a noindex meta tag. Second, respect for the file is voluntary. The major search engines and most reputable crawlers honour it, including the AI training bots you can block here, but a hostile scraper can simply ignore it. With those two caveats in mind, robots.txt is an essential, standard part of running a site — it guides crawlers, saves crawl budget, and points them to your sitemap.
About this generator
Choose a template, add the paths to disallow and your sitemap URL, optionally block AI crawlers, and copy or download the finished robots.txt. It is generated entirely in your browser — nothing is uploaded. Round out your on-page setup with the Meta Tag Generator and the Schema / JSON-LD Generator.
About the robots.txt Generator
robots.txt Generator is a quick, free tool for web development and data tasks. It works in your browser and keeps everything on your device. Create a correct robots.txt file for your website — allow or block crawlers, disallow private paths, add your sitemap, and optionally block AI scrapers like GPTBot. Copy or download it in seconds, entirely in your browser.
How it works
Pick your options and the tool makes the result right away. Do not like it? Make another one — you can do this as many times as you want. When it looks right, copy it into your own project. Everything is made on your device, so it is yours alone.
Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.
Frequently Asked Questions
Where does the robots.txt file go?
At the very root of your domain — it must be reachable at https://yoursite.com/robots.txt. Crawlers look for it there and nowhere else, so a robots.txt in a subfolder is ignored.
Does Disallow hide a page from search results?
Not exactly. Disallow tells well-behaved crawlers not to fetch a path, but a disallowed URL can still appear in results if other sites link to it (just without a description). To truly keep a page out of search, use a noindex meta tag or an HTTP header instead — and remember robots.txt is a public file anyone can read, so never list secret paths in it.
Should I block AI crawlers?
That is your choice. Bots like GPTBot (OpenAI), CCBot (Common Crawl), Google-Extended, and others gather text to train AI models. Blocking them in robots.txt asks them not to use your content for training. Reputable ones honour it, though robots.txt is a request, not an enforced rule.
Is my input uploaded?
No. The file is generated entirely in your browser as you type; nothing is sent anywhere.
How do I use the robots.txt Generator?
Simply pick your options and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Does it cost anything or need an account?
No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.
Is anything I type uploaded?
No. The tool works entirely on your device, so the values you enter never leave your browser.
Common Use Cases
Launch a new site correctly
Generate a clean robots.txt that allows crawling and points to your sitemap from day one.
Keep admin and private paths out
Disallow /admin, /cart, /search, and other paths you do not want crawled or indexed.
Opt out of AI training
Block GPTBot, CCBot, and similar crawlers with one click.
Point crawlers to your sitemap
Add the Sitemap line so search engines discover every page efficiently.
Last updated: