Robots.txt Generator
Last updated: 23 October 2026
Create a robots.txt file with allow and disallow rules, crawl-delay and a sitemap line, then copy or download it ready to upload. Free and instant.
Save the file as robots.txt in the root of your domain (https://example.com/robots.txt). Note that Crawl-delay is honoured by some crawlers, such as Bing, but Google ignores it - use Search Console settings for Googlebot instead.
Why this tool is private
Everything happens in your browser — no server receives your input. No sign-up, no uploads, nothing to install.
How to use the Robots.txt Generator
- Leave the User-agent as * to apply your rules to every crawler, or type a specific crawler name such as Googlebot.
- List the paths crawlers must not visit in the Disallow box, one per line, each starting with a slash - for example /admin/ or /search/.
- If a blocked folder contains pages crawlers may still visit, add those paths to the Allow box, one per line.
- Optionally add your sitemap URL and a crawl-delay in seconds. Leave either blank and that line is simply left out of the file.
- Copy the generated file, or click Download robots.txt, and place it in the root of your domain so it sits at yoursite.com/robots.txt.
About this Robots.txt Generator
A robots.txt file tells search engine crawlers which parts of your site they may request - and writing one by hand is an easy place for a small syntax slip to block too much, or nothing at all. This generator replaces the guesswork with a form. Choose a user-agent, list the paths to disallow, add any allow exceptions, an optional crawl-delay and your sitemap URL, and the file is assembled live in the correct order. Copy it or download it as robots.txt, ready to drop into your domain's root. No account, no upload, nothing stored - the whole thing happens in your browser.
How this robots.txt generator works
The generator writes your rules in the order the standard expects. First comes the User-agent line naming who the rules apply to - a wildcard * for every crawler, or a specific name like Googlebot. Your Allow lines come next, then your Disallow lines, then the Crawl-delay if you set one. The Sitemap line goes last, after a blank line, because it is not part of any crawler's rule group: it simply advertises where your sitemap lives, to any crawler that reads the file.
Paths are written exactly as you type them, one rule per line, and blank lines in the boxes are ignored - so you can draft loosely and still get a tidy file. Everything is assembled in your browser as you type. Nothing is sent to your website, and the generator does not place the file for you: download or copy it, then upload it to your domain's root yourself.
Worked example: a small blog
Suppose you run a blog and want crawlers to skip the admin area, the internal search results and a temporary folder, while still finding a public downloads page inside an otherwise blocked directory. You would set the user-agent to *, put /admin/, /search/ and /tmp/ in the Disallow box, put /admin/public-downloads/ in the Allow box, skip the crawl-delay, and add your sitemap address.
The generated file reads: User-agent: * - then Allow: /admin/public-downloads/ - then Disallow: /admin/, Disallow: /search/ and Disallow: /tmp/ - then a blank line and Sitemap: followed by your sitemap URL. Five minutes of form-filling produces exactly the file a developer would write by hand, with no risk of a misplaced colon or a forgotten slash quietly invalidating a rule.
Writing rules that do what you expect
Two habits prevent most robots.txt mistakes. First, end folder paths with a trailing slash: Disallow: /tmp/ blocks the folder and everything beneath it, which is almost always what you mean, while a path without the slash can match more than you intended - /tmp would also match /tmpfile.html. Second, remember that matching is by prefix, not by whole words, so read every rule aloud as 'everything starting with this'.
When an Allow and a Disallow both match a URL, crawlers follow the longer, more specific rule, which is why exceptions work. After publishing your file, test it: Google Search Console's robots.txt report and URL inspection tool show how Google interprets your actual rules against real addresses. A two-minute check there catches the classic error - accidentally blocking the CSS, scripts or images a crawler needs to render your pages properly.
Honest limitations
This is a builder, not an auditor. It does not fetch your current robots.txt, check your paths against your real site, warn you that a path does not exist, or confirm the file is in place afterwards. It produces one user-agent group per file, so sites needing genuinely different rules per crawler must merge blocks by hand. And no generator can fix a misunderstanding of the standard itself: robots.txt controls crawling, not indexing, and it is guidance that well-behaved bots follow - not a barrier.
Treat the output as a strong first draft. Generate it here, read it once with fresh eyes, upload it, then verify it live at yoursite.com/robots.txt and in Search Console. That loop - generate, review, verify - is the whole job, and it is worth redoing whenever you restructure your site, launch a new section or notice pages being crawled that should not be.
How it works
Tell search engine crawlers which parts of your site they may visit by building a robots.txt file without writing the syntax by hand. Add the paths you want to block, any exceptions you want to allow, an optional crawl-delay and your sitemap address, and the generator assembles a correctly formatted file you can copy or download. It runs entirely in your browser and does not test the file on your site or upload it for you.
Privacy note: this tool runs locally in your browser. Your input is not uploaded, stored in analytics, or placed in the page URL.
Frequently asked questions
What is a robots.txt file?
Robots.txt is a small plain-text file that lives in the root of a website and tells visiting crawlers - search engine bots such as Googlebot and Bingbot - which URLs they may and may not request. Each rule names a user-agent and lists allowed or disallowed paths. Well-behaved crawlers read it before crawling. It has been a web standard since 1994 and almost every site, large or small, has one.
Does robots.txt keep pages out of Google completely?
Not entirely. A disallowed page cannot be crawled, but if other sites link to it, search engines may still list its URL in results - shown without a description, because they could not read the content. For a page that must truly stay out of search results, use a noindex tag after allowing the crawl, or protect it with a login. Never use robots.txt to hide sensitive data such as private documents or personal information.
What is the difference between Allow and Disallow?
Disallow forbids crawling for everything under a path; Allow carves out an exception inside a blocked area. For example, Disallow: /admin/ with Allow: /admin/public/ blocks the whole admin folder except its public subfolder. When rules overlap, crawlers generally apply the most specific matching rule - the one with the longest path - which is what makes an Allow exception work even though the broader Disallow also matches.
What does Crawl-delay do, and does Google use it?
Crawl-delay tells a crawler how many seconds to wait between requests, which can protect a small or slow server from being overwhelmed by rapid crawling. Some crawlers, notably Bing's, honour it. Googlebot ignores the line completely - Google asks you to manage crawl rate in Search Console instead. Include it if your host struggles under crawl load, but do not expect it to change how often Google visits.
Where do I put the file, and what must it be named?
It must sit in the top-level directory of a host and be named exactly robots.txt, all lowercase, so it is reachable at yoursite.com/robots.txt. Each subdomain needs its own file - the robots.txt on www.example.com does not cover blog.example.com - and the same applies to non-standard ports. This generator gives you the file ready-named when you download it; you just upload it to that root location.
Can I have different rules for different crawlers?
Yes. A file can hold several groups, each starting with its own User-agent line followed by that crawler's rules, and crawlers only obey their own group (plus the wildcard group). This generator builds one group at a time, which covers the most common case: identical rules for everyone. For a special case, generate a second file for the named crawler and merge the two blocks together in a text editor.
Will robots.txt stop scrapers or protect private pages?
No. Robots.txt is a voluntary standard - a set of requests, not a lock. Reputable search engines obey it, but spam bots, scrapers and attackers routinely ignore it, and some actively read it to find the paths you hoped to hide. Protect private areas with passwords and proper access controls, and treat robots.txt purely as traffic guidance for cooperative crawlers.
Related tools
Developer Tools
Meta Tag Generator
Build SEO, Open Graph and Twitter Card meta tags by filling in a form, then copy the ready HTML for your page head. Free, instant and private.
Developer Tools
JSON Formatter & Validator
Beautify, validate and minify JSON locally: 2-space formatting, parser errors with positions, and a type and key-count summary for valid JSON.
Developer Tools
URL Encoder / Decoder
Percent-encode text for use in URL query strings, or decode encoded strings back to readable text, with a clear error when the input is malformed.