Toolstia / robots.txt generator
Robots.txt generator
A robots.txt file is the first thing well-behaved crawlers request from your site. It is a plain text file with a very strict, easy-to-misread syntax, and one wrong line can hide a whole site from search engines. This generator writes the file for you from simple choices: allow everything, block everything, or block and allow specific paths, with optional sitemap lines, a crawl delay, and a ready-made block for eight AI crawlers.
It suits site owners moving from a staging site to production, WordPress and shop owners who want to keep internal search and admin paths out of crawls, and anyone who wants to state a position on AI training bots. The text is built in your browser as you change the options, and you copy it into a file named robots.txt in the root of your domain.
Save the text as a file called robots.txt in the root of your site, so it opens at yourdomain.com/robots.txt. Robots.txt is a request that well-behaved crawlers follow. It does not hide pages and it does not protect private content.
How it works
- Pick allow everything, block everything or specific paths.
- Add your sitemap URLs and optional settings.
- Copy the result into a file called robots.txt in your site’s root.
What robots.txt does
It tells search engine crawlers which parts of your site they may request. It lives at yourdomain.com/robots.txt.
Specific paths
List paths to block, such as /admin/ or /search/, and paths to allow inside them. Paths should start with a slash.
AI crawlers
One checkbox adds rules that ask well-known AI training crawlers, such as GPTBot, CCBot, ClaudeBot and Google-Extended, not to crawl your site. This does not affect normal search indexing.
Limits
Robots.txt is a polite request. It does not hide pages from people, and a blocked page can still appear in results if other sites link to it. To keep a page out of search results, use a noindex tag.
A custom file, line by line
Choose the custom option, put /admin/ and search in the block box, /admin/public/ in the allow box, set a crawl delay of 10 and add https://example.com/sitemap.xml. The result is a User-agent: * group containing Disallow: /admin/, Disallow: /search, Allow: /admin/public/ and Crawl-delay: 10, then a blank line and the Sitemap line.
Notice that search became /search. The tool adds a leading slash to any path that does not start with a slash or an asterisk, because rules are matched against the path of the URL.
Prefix matching and trailing slashes
Rules match from the start of the path, so Disallow: /search also blocks /search-results and /searchable-tools, while Disallow: /search/ blocks only paths inside that folder. Use the trailing slash when you mean a directory. Rules are also case-sensitive, so /Admin/ and /admin/ are different paths.
When an Allow and a Disallow both match a URL, the major search engines follow the most specific, meaning longest, rule. That is why allowing /admin/public/ inside a blocked /admin/ works.
What the AI crawler option writes
Ticking it adds a separate group, each with Disallow: /, for GPTBot, ChatGPT-User, Google-Extended, CCBot, ClaudeBot, anthropic-ai, PerplexityBot and Bytespider. Every other crawler, including normal search bots, still follows the group for the asterisk, so ordinary indexing is not affected.
This is a request, not an enforcement. Operators decide whether their bots honor it, and the list reflects names that are widely used today, so new bots will not be covered until you add them.
Crawl delay and sitemap lines
The crawl delay must be a whole number from 1 to 600, and the tool shows an error otherwise. Google ignores the directive entirely, so it only matters for crawlers that support it. Sitemap lines must be full addresses beginning with http:// or https://, and each one goes on its own line; a relative path like /sitemap.xml is rejected.
Sitemap lines are not tied to any user-agent group, so their position does not matter. The tool places them at the end.
Where the file must live
The file only applies when it is served from the root of the exact host it describes: https://example.com/robots.txt covers example.com, but not blog.example.com, which needs its own file. It should be plain text, UTF-8, and Google reads only about the first 500 KiB, which is plenty for a normal site.
A missing file is treated as permission to crawl everything. An error page returned for robots.txt can cause confusion, so open the address in a browser after uploading to confirm it shows the plain text.
Mistakes that cost traffic
The most expensive one is leaving Disallow: / in place after launching a site that was built under a staging block. Another is blocking CSS and JavaScript folders, which stops search engines from rendering your pages properly. A third is trying to remove an indexed page by blocking it: the crawler can then no longer read a noindex tag, and the address may stay listed. Remove such pages with noindex or a proper removal, and only then block them if you need to.
Questions
Where do I put the file?
In the root folder of your domain, so that it opens at yourdomain.com/robots.txt.
Does Google obey crawl delay?
No, Google ignores Crawl-delay. Bing and some other crawlers respect it.
Is my data stored?
Everything happens in your browser, and nothing you enter is sent anywhere.
Does blocking a path make it private?
No. The file is public, so anyone can read which paths you listed, and it does not stop people or badly behaved bots from opening them. Use login protection for anything sensitive.
Can I block only one search engine?
This generator writes rules for all crawlers, plus the AI block. To target one named bot, such as a single search engine, add a separate User-agent group with its name by hand after copying the output.
What happens if I choose block everything?
The file contains User-agent: * and Disallow: /, which asks every compliant crawler to stay out of the whole site. It is right for staging and private sites and wrong for any site you want to appear in search.
How long until a change takes effect?
Search engines cache robots.txt and refresh it periodically, often within a day, so a change may not be picked up instantly. Pages already indexed are not removed just because you block them.
Do wildcards work in paths?
Major search engines support an asterisk to match any characters and a dollar sign to mark the end of a URL. The tool keeps a path that starts with an asterisk as you typed it, but it does not validate wildcard syntax.