Robots.txt Generator
FreeBuild a valid robots.txt file with allow/disallow rules and a sitemap reference.
100 free uses per day
About This Tool
Robots.txt Generator builds a valid robots.txt file from a few simple choices: whether crawlers are allowed by default, which paths to block or allow, your sitemap address and an optional crawl delay. The file it produces applies to all crawlers (User-agent: *).
A robots.txt file tells well-behaved crawlers which parts of your site not to fetch. It sits at the root of your domain, and one wrong line can stop search engines from reading your whole site, so it's worth generating carefully.
How to Use Robots.txt Generator
- 1
Choose the default policy
Almost every public website should use Allow. Choosing Disallow with no paths blocks the entire site.
- 2
List the paths to block or allow
One path per line, starting with a slash, such as /cart/ or /admin/.
- 3
Add your sitemap address
Use the full address, including https://, so crawlers can find all your pages.
- 4
Upload the file
Save it as robots.txt in the root of your site, so it opens at yourdomain.com/robots.txt.
Example
A shop blocking its cart and checkout
ExampleInput
Default policy: Allow
Disallow paths: /cart/
/checkout/
Sitemap: https://www.example.com/sitemap.xmlOutput
User-agent: *
Disallow: /cart/
Disallow: /checkout/
Sitemap: https://www.example.com/sitemap.xmlCrawlers may fetch everything except the two listed folders, and the Sitemap line shows them where to find the full list of pages.
Examples are illustrative demonstrations, not live results — run the tool above for your own data.
Use Cases
Tips for Better Results
Blocking isn't the same as hiding
A blocked page can still appear in Google if other sites link to it. To keep a page out of results, use a noindex tag and don't block it, so Google can see the tag.
Don't block CSS or JavaScript
Google needs them to render your pages properly and judge how they work on phones.
Don't list secrets
Anyone can read robots.txt. Listing a private path just advertises it. Protect private areas with a login.
Crawl-delay has limited use
Google ignores this setting, though some other crawlers honour it.
Important Notes
Paths are matched from the start of the URL and are case-sensitive, so /Admin/ and /admin/ are different. The rules cover only the exact host and protocol the file is served from, so a subdomain needs its own file. Robots.txt is a request, not a security control: well-behaved crawlers follow it, and others may not.
Frequently Asked Questions
Related Tools
Related Articles
Point crawlers at the right pages
Generate an XML sitemap for your site, or audit how crawlable it is.