Mock robots.txt Generator
Generates example robots.txt files to guide search engine crawlers
- User-agent
- *
- Disallow
- /search/
- Disallow
- /print/
- Disallow
- /drafts/
- Disallow
- /preview/
- Disallow
- /legacy/
- Disallow
- /v0/
- Disallow
- /staging/
- Disallow
- /tmp/
- Disallow
- /*?lang=
- Disallow
- /*?print=1
- Disallow
- /*&store=
- Disallow
- /*?mc_cid=
- Allow
- /_static/
- Allow
- /docs/
- User-agent
- Discordbot
- Allow
- /
Generated 52 words · 477 characters
See 3 examples
- Example 1
# robots.txt for northstar.example.com (documentation site) # Maintained by the content team # Last updated: 2024-05-28 User-agent: * Disallow: /search/ Disallow: /print/ Disallow: /drafts/ Disallow: /preview/ Disallow: /legacy/ Disallow: /v0/ Disallow: /staging/ Disallow: /tmp/ Disallow: /*?lang= Disallow: /*?print=1 Disallow: /*&store= Disallow: /*?mc_cid= Allow: /_static/ Allow: /docs/ User-agent: Discordbot Allow: / Sitemap: https://northstar.example.com/sitemap.xml
- Example 2
# robots.txt for www.greenleaf.test (online store) # Maintained by the digital team # Last updated: 2025-02-24 User-agent: * Disallow: /ca/my-orders/ Disallow: /ca/order-tracking/ Disallow: /ca/checkout/thank-you/ Disallow: /ca/search/ Disallow: /ca/cart/ Disallow: /ca/catalog/search/ Disallow: /cgi-bin/ Disallow: /admin-legacy/ Disallow: /*?sort= Disallow: /*.tar$ Allow: /ca/sale/ Allow: /ca/collections/ User-agent: anthropic-ai User-agent: Applebot-Extended User-agent: Bytespider Disallow: / Sitemap: https://www.greenleaf.test/sitemap.xml Sitemap: https://www.greenleaf.test/sitemaps/products-1.xml
- Example 3
# robots.txt for developer.westwind.example.com (documentation site) # Last updated: 2025-07-25 # Keep this file under 500 KiB; larger files may be truncated. User-agent: * Disallow: /internal/ Disallow: /feedback/ Disallow: /archive/old/ Disallow: /preview/ Disallow: /v0/ Disallow: /search/ Disallow: /v1-archive/ Disallow: /*?tab= Disallow: /*?lang= Disallow: /*&color= Allow: /_static/ Allow: /press/ User-agent: Googlebot Disallow: /preview/ Disallow: /*?color= # Third-party SEO crawlers User-agent: SemrushBot Disallow: / Sitemap: https://developer.westwind.example.com/sitemap.xml
About this generator
A misconfigured robots.txt file can accidentally block search engines from crawling your content, or fail to block crawlers from low-value paths that clutter your index. Having a correct sample that shows the syntax — user-agent, disallow, allow, and the sitemap directive — in the right order helps when you are writing or auditing a real file. This tool generates a sample robots.txt with no inputs required. Each generated file models one kind of site — an online store, a WordPress blog, a documentation site, a web app, a news site, or a community forum — on a reserved example domain. It opens with comment lines, then a wildcard User-agent: * group with Disallow rules that fit that site type (cart and checkout paths for a store, wp-admin and feeds for a blog, login and dashboard routes for an app), wildcard patterns for tracking and faceted-navigation parameters such as /*?sort= or /*?utm_source=, a few infrastructure paths, and Allow rules for public sections and assets. One or two extra groups follow — a search engine crawler with its own rules, AI training crawlers blocked site-wide, throttled SEO tool crawlers, or link-preview bots — and the file ends with one or two Sitemap lines. Paths can sit under a locale or section prefix such as /en-gb/ or /shop/, so no two files look alike. Copy the output into your site's robots.txt at the web root, then replace the Sitemap URL with your real sitemap location and adjust the Disallow paths to match your site structure. A critical reminder: robots.txt is publicly visible and honours only well-behaved crawlers — it does not protect private pages from direct access or from malicious bots.
How to use
- Click Generate to produce a robots.txt.
- Copy it into your site root.
- Adapt the disallow rules to your site.
- Never use it to hide sensitive pages.
Use Cases
- •Learning robots.txt syntax
- •Documenting crawl rules
- •Testing a robots.txt parser
- •Seeding an example file
- •Demoing SEO configuration
Tips
- →robots.txt is a request, not security.
- →It is publicly visible.
- →Reference your sitemap in it.
- →Disallow low-value or private paths.
FAQ
what does the generated robots.txt include
A User-agent: * group with Disallow rules suited to one site type (store, blog, docs, web app, news, or forum), wildcard rules for URL parameters and file types, Allow rules for public sections and assets, one or two bot-specific groups (a search engine crawler, AI training crawlers, SEO tool crawlers, or link-preview bots), and Sitemap lines on the same example domain. Everything is randomized each run.
does robots.txt protect private pages from being accessed
No. robots.txt only requests that well-behaved crawlers skip listed paths — it does not block HTTP access. The file is publicly visible, so listing a path can actually advertise it. Use authentication and server-side access controls to protect genuinely private content.
what paths should I typically disallow
Admin and internal areas, cart and checkout flows, search-results pages, duplicate or draft content, and other URLs with no SEO value. Disallowing these keeps them out of search indexes without affecting crawlability of your public pages. Reference your sitemap to help crawlers find what you do want indexed.
why are there separate groups for specific bots
A crawler follows only the most specific group that names it and ignores the User-agent: * group, so a named group must repeat any rules you still want that bot to follow. The samples show common patterns: a search engine crawler with its own short rule set, AI training crawlers blocked with Disallow: /, SEO tools slowed with Crawl-delay (which Google ignores), and link-preview bots allowed everywhere.
You might also like
Popular tools from other categories that share themes with this one.