Robots.txt Generator
Developer Tools · Added 18 August 2026
Build a robots.txt group by group — user-agents, disallowed paths, allowed exceptions, sitemap lines — and get it checked as you type. The linter is the useful half: it catches the duplicate groups crawlers silently ignore, the paths that will never match, and the disallow rules that would remove a site from search or from ad serving entirely.
robots.txt
User-agent: * Disallow: /admin/ Disallow: /login Disallow: /cart Disallow: /checkout Disallow: /search Disallow: /*?s= Disallow: /*?q= Sitemap: https://example.com/sitemap.xml
Save this as robots.txt in the root of your domain — it is only read from https://example.com/robots.txt, never from a subdirectory, and each subdomain needs its own. Serve it as text/plain.
How to use the robots.txt generator
- 1Pick a preset close to what you need, or start from the default group.
- 2Set the user-agent for each group. Use * for the catch-all and a specific name for exceptions.
- 3List disallowed paths one per line, and any allowed exceptions to them.
- 4Add your sitemap URL — it must be absolute, and it is the one directive that helps discovery.
- 5Read the checks below the output, then save the file as robots.txt in your domain root.
Examples
A typical CMS
- Input
- Block /admin/, /cart, /checkout and internal search parameters
- Result
- One User-agent: * group with five Disallow lines and a Sitemap line
Allowing an exception inside a blocked folder
- Input
- Disallow /admin/ but Allow /admin/public/
- Result
- Both lines are emitted — the longer path wins, so /admin/public/ stays crawlable
Opting out of AI training crawlers
- Input
- The AI opt-out preset
- Result
- Separate groups blocking GPTBot, CCBot, Google-Extended, ClaudeBot and others, while * stays open
About the robots.txt generator
What the file is actually for
robots.txt manages crawl budget, not visibility. Its best use is keeping crawlers away from URLs that are infinite, expensive or worthless to index: faceted search parameters, session URLs, internal search results, calendar pages stretching to the year 3000. On a large site, that is real money in server load and real benefit in getting the pages you care about crawled more often.
Its worst use is trying to hide something. A robots.txt is public, and listing a path in it advertises exactly where to look. Anything genuinely sensitive belongs behind authentication, not behind a Disallow line that acts as a signpost.
The rules of the format
RFC 9309 standardised what had been common practice since 1994. The essentials: rules are grouped under one or more User-agent lines; paths are site-relative and case-sensitive; * matches any sequence of characters and $ anchors the end of a URL; and an empty Disallow means everything is allowed.
Crawl-delay is not part of the standard. Google ignores it entirely and expects crawl rate to be managed in Search Console; Bing and Yandex do honour it. Host is a Yandex extension. Sitemap is universally supported and is the only line in the file that helps a crawler find more rather than less.
Mistakes that cost traffic
The expensive one is a staging robots.txt reaching production. Disallow: / on a live site stops crawling of everything, and because the pages cannot be fetched, existing entries decay out of the index over weeks. The recovery is slow even after the file is fixed.
Two subtler ones. Blocking CSS and JavaScript directories, which was once standard advice, now prevents Google from rendering the page and judging it mobile-friendly. And blocking a URL you have also asked to be de-indexed, which guarantees the noindex is never seen — the page stays in the index precisely because you blocked the instruction to remove it.
Frequently asked questions
Does Disallow keep a page out of Google?
Which rule wins when two match?
Why does a second group for the same user-agent get ignored?
Does a named group inherit the wildcard group's rules?
Does blocking AI crawlers actually work?
Where does the file go, and does it apply to subdomains?
Related tools
Meta Tag Analyzer
Developer Tools
Audit a page's title, description and social tags from its HTML, with card previews.
Schema Markup Generator
Developer Tools
Generate JSON-LD structured data for articles, businesses, products, events and more.
URL Encoder / Decoder
Developer Tools
Percent-encode and decode URLs and query parameters, with a query string breakdown.