Robots.txt Generator
Build a correct robots.txt with presets, custom rules, AI-bot blocking and sitemap line — download ready.
1,098 views
What robots.txt Actually Does
robots.txt is a plain text file at your domain root that tells search engine crawlers which URLs they should not fetch, using a small set of directives: User-agent (which bot the rule applies to), Disallow (the path to skip), Allow (an exception carved out of a broader Disallow), and Sitemap (where to find your sitemap.xml). Well-behaved crawlers like Googlebot read this file before crawling and respect it, which is exactly why it works for saving crawl budget and keeping admin pages, search-result pages and filtered URLs out of the crawl queue.
Concrete example: add Disallow: /admin/ and Disallow: /search?, and Googlebot stops spending its limited crawl budget on your login screens and internal search results, freeing that budget for pages you actually want indexed. But here is the critical warning this tool exists to teach: robots.txt is not a security measure. It only guides well-intentioned bots — a malicious scraper, a competitor's bot, or anyone with a browser can simply ignore the file and request the disallowed URL directly, because the file itself is served publicly to anyone who asks for it at yourdomain.com/robots.txt.
What You Should Know
This creates a genuine trap: adding Disallow: /secret-admin-panel/ to keep a sensitive path out of search results actually publishes its exact address to every person or bot that reads the file, which is the opposite of hiding it. If a page truly needs to stay private, the only real protection is access control — a password, an authentication check, or removing it from public hosting entirely — never robots.txt. Separately, disallowing a URL does not remove it from a search index if it is already there or gets linked to externally; a blocked page can still appear in results, usually with no description since the crawler was never allowed to read the content. The correct tool to prevent indexing is a noindex meta tag or HTTP header, which requires the page to be crawlable in the first place.
- The file must live exactly at the domain root (example.com/robots.txt) — copies placed in subdirectories are ignored, and each subdomain needs its own file.
- The modern addition this generator handles is whether to block AI training crawlers (GPTBot, CCBot, Google-Extended and similar). Blocking them keeps your content out of future model training data, but it also removes you from AI-generated answers that might otherwise cite and link back to your site — there is no universally correct choice, only a trade-off based on your goals.
- Always include the Sitemap directive pointing to your sitemap.xml — it is the one line in the file that actively helps crawlers find your content, rather than telling them what to skip.
Frequently Asked Questions
Where exactly does the robots.txt file need to be placed?
Exactly at the domain root — yourdomain.com/robots.txt. A copy inside a subfolder such as yourdomain.com/blog/robots.txt is simply ignored by crawlers, and every subdomain, like shop.yourdomain.com, needs its own separate file.
Can I use robots.txt to hide a private or sensitive page?
No, and doing so can backfire. The file is public, so listing a sensitive path under Disallow announces its exact URL to anyone who reads it. Real privacy requires access control, such as a login or authentication check, not a crawler directive.
If I disallow a URL, will it disappear from search results?
Not necessarily. Disallow only stops crawling, not indexing — a page can still be indexed, often with no visible description, if it is linked from elsewhere. To actually remove a page from search results, use a noindex meta tag or HTTP header on a page crawlers are still allowed to reach.
Should I block AI training bots like GPTBot?
It is a genuine trade-off. Blocking them protects your content from being used in future model training, but also removes you from AI-generated answers that might cite and link to your site. Publishers are split roughly evenly — decide based on whether AI referral traffic matters to your business.
Do malicious bots or scrapers respect robots.txt?
No, and this is the file's biggest limitation. robots.txt relies entirely on voluntary compliance — reputable crawlers like Googlebot honor it, but scrapers built to harvest content, price data or emails typically ignore it completely. It is guidance for good actors, not a barrier against bad ones.
Similar Tools
Report a Problem
Robots.txt Generator
Comments
No comments yet — be the first to write one!