Free Tools

robots.txt Generator

Generate a robots.txt file for search engine crawlers

Result
robots.txt Content
User-agent: * Disallow:
Rules
0 rules defined
Crawl Status
Open (all allowed)

About This Tool

Builds a robots.txt file from a structured form: user-agent rules, allow/disallow paths, sitemap URLs, and crawl-delay directives. Output follows the de facto standard documented in RFC 9309.

Directives are case-insensitive but path matching is case-sensitive. Search engines have varied support for non-standard fields like crawl-delay; major engines mostly ignore it.

The Robots Exclusion Protocol was first proposed in 1994 by Martijn Koster and remained an informal convention until being codified as RFC 9309 in 2022. The format is line-oriented: each block opens with one or more 'User-agent: <name>' lines naming a crawler, followed by 'Allow:' and 'Disallow:' lines listing paths. A wildcard 'User-agent: *' applies to crawlers not specifically named. The file lives at the root of a host (https://example.com/robots.txt), and crawlers fetch it before any other URL on that host. Subdomains require their own robots.txt; one at the apex does not cover sub.example.com.

A worked example: a typical e-commerce robots.txt blocks crawlers from cart and checkout while allowing the product catalog. 'User-agent: *\nDisallow: /cart\nDisallow: /checkout\nDisallow: /api/\nAllow: /api/sitemap.xml\nSitemap: https://example.com/sitemap.xml'. The Allow exception for /api/sitemap.xml overrides the broader /api/ disallow because RFC 9309 specifies that the most-specific (longest matching) rule wins. Google and Bing follow this convention; older or smaller crawlers may evaluate rules in document order, where the first match takes precedence.

Limitations are widely misunderstood. Disallow blocks crawling, not indexing. A page that cannot be crawled can still appear in search results if other sites link to it, sometimes with no description because the crawler never read the content. Suppressing indexing requires a noindex meta tag or X-Robots-Tag HTTP header, which can only be discovered if the page is crawlable. Robots.txt is also strictly advisory; well-behaved crawlers honor it, malicious scrapers ignore it. Sensitive paths should never be hidden by robots.txt alone, because the file itself is publicly readable and effectively advertises the locations of restricted content. Authentication, server-side IP blocking, or rate limiting are appropriate for genuine access control.

Wildcard syntax (* and $) is supported by Google, Bing, Yandex, and most major engines but is technically an extension to the original 1994 spec. Crawl-delay (a numeric pause between requests in seconds) is honored by Bing and Yandex but ignored by Google, which uses its own crawl-rate algorithm. The Sitemap directive is universally supported and is independent of user-agent blocks.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions

Does Disallow guarantee a page won't be indexed?
No. Disallow blocks crawling, not indexing. A blocked URL can still appear in search results if it's linked from elsewhere, sometimes without a snippet. Use a noindex meta tag or HTTP header to suppress indexing.
What is the precedence between Allow and Disallow?
Per RFC 9309, the most specific (longest matching) rule wins. If two rules tie in length, Allow takes precedence for Google; Bing follows the same convention. Older crawlers may differ.
Is wildcard support standard?
* and $ are supported by Google, Bing, Yandex, and most others, but they are extensions to the original 1994 spec. Smaller crawlers may treat them literally.
Where should robots.txt be located?
At the root of the host: https://example.com/robots.txt. Subdirectory placement is ignored. Subdomains require their own robots.txt; one at the apex does not cover them.
Can robots.txt hide sensitive content?
No. The file is publicly readable, which means listing a path in Disallow effectively advertises that the path exists. Sensitive content needs authentication or server-side access control, not robots.txt.
Does Google honor crawl-delay?
No. Google ignores crawl-delay and uses its own rate adaptation based on server response times. Bing and Yandex honor it. To slow Google's crawling, use the Search Console crawl rate setting instead.
How do I block a specific bot but allow others?
List the specific bot's user-agent first with its restrictions, then use 'User-agent: *' with the general rules. Crawlers match the most specific user-agent block they qualify for; the wildcard block is the fallback.
What's the file size limit?
RFC 9309 recommends a 500 KB cap. Google enforces this and ignores anything beyond. Most robots.txt files run under 5 KB; the cap is generous and rarely an issue except for sites generating one rule per URL programmatically.
Should I block AI crawlers like GPTBot?
A choice with consequences. Blocking GPTBot, ClaudeBot, and similar prevents site content from training future models, but also prevents inclusion in AI-generated answer summaries that increasingly drive search-replacement traffic. The right answer depends on whether the site benefits more from training-data exclusion or from AI-search visibility.
robots.txt Generator | Free Tools - Coherence Daddy