What Is the Robots.txt Generator?
Create valid robots.txt files for your website. Configure crawl rules for different user agents and add sitemap references; paths typed without a leading "/" are corrected and listed above the output.
Why Use This Tool?
The robots.txt file tells search engine crawlers which parts of your site to access. An incorrect robots.txt can accidentally block Google from indexing your entire site — a common and costly mistake.
How to Use This Robots Txt Generator
- Select your user-agents — Choose which crawlers to configure — Googlebot, Bingbot, or all user-agents (*). You can create separate rules for each.
- Set allow/disallow rules — Specify which paths to allow or block. Disallow /admin/ to block admin pages, or Disallow /api/ to prevent API endpoint indexing.
- Add your sitemap URL — Include your XML sitemap location so search engines can find your complete page list.
- Set a crawl delay — Optionally add a crawl-delay directive for bots that respect it (Bing does, Google ignores it).
- Copy or download — Grab the complete robots.txt content and save it to your site's root directory.
Worked example: rules checked with an RFC 9309 parser
On October 12, 2026 we typed admin (no leading slash) and /*.pdf$ into the tool's Disallow fields and a crawl delay of 10, then tested the generated file with Protego, the robots.txt parser used by Scrapy, which follows the Robots Exclusion Protocol (RFC 9309) with Google's wildcard rules.
| URL | Rule | Result |
|---|---|---|
| /admin/ | Disallow: admin (before Oct 12, 2026); now written as Disallow: /admin | Before: allowed, the rule matched nothing. Now: blocked (Protego re-test) |
| /files/a.pdf | Disallow: /*.pdf$ | blocked |
| /files/a.pdf?x=1 | Disallow: /*.pdf$ | allowed: $ means "ends here", so a query string escapes it |
| /private/x | (rule replaced in this test) | allowed |
| Crawl-delay for Bingbot | Crawl-delay: 10 | 10 seconds (Google ignores this line) |
- Paths are checked now. RFC 9309 matches rules against the URL path, which always begins with a slash, so
Disallow: adminused to block nothing. The tool now adds the missing “/”, encodes spaces as %20, drops empty Allow lines and warns if the sitemap is not a full URL, and lists each change above the output. In the Protego re-test, /admin and /admin/x are blocked as intended. - "$" anchors the very end of the URL.
/*.pdf$blocks/a.pdfbut not/a.pdf?download=1. Drop the $ (/*.pdf) if PDFs can carry query strings. - The longest matching rule wins. With
Allow: /andDisallow: /admin/,/admin/is blocked because its rule is longer; order in the file does not matter to Google or Bing. - Blocking is not hiding. A disallowed URL can still appear in results if others link to it; use
noindex(on a crawlable page) to keep it out of the index.
Sources
Checked on .
Frequently Asked Questions
📖 Learn More
Related Article How to Generate a Robots.txt File →Built by Derek Giordano · Part of Ultimate Design Tools