RG
Robots.txt Generator
Build a valid robots.txt file with user-agent rules, allow/disallow paths, crawl-delay and a sitemap reference.
More SEO Tools
How to Use Robots.txt Generator
Add one or more user-agent groups, set Allow and Disallow paths for each, optionally set a crawl-delay and a sitemap URL, or start from a preset (Allow all, Block all, WordPress default). The robots.txt output updates live — copy it or download it directly as robots.txt.
About Robots.txt Generator
A robots.txt file is a small plain-text file placed at the root of a website (example.com/robots.txt) that tells well-behaved web crawlers — search engine bots, SEO tools, archivers — which parts of a site they may or may not request. It was proposed in 1994 by Martijn Koster after a crawler accidentally overloaded his server, and it has remained essentially unchanged since: a simple, voluntary protocol (the Robots Exclusion Protocol) with no enforcement mechanism beyond crawler goodwill. Google, Bing and every other major search engine respect it, which is what makes it useful, but it is not a security or access-control tool — anything listed as Disallow is still publicly reachable by anyone who knows or guesses the URL, and malicious bots simply ignore the file entirely.
The file's syntax is a short list of directives grouped under one or more User-agent lines. A group starts with User-agent: (either a specific bot name like Googlebot, or * to match every crawler that doesn't have a more specific group of its own), followed by any number of Allow and Disallow lines giving paths that crawler may or may not fetch, and optionally a Crawl-delay line asking the bot to wait a given number of seconds between requests (Googlebot ignores Crawl-delay entirely, controlling its own crawl rate through Google Search Console instead, but Bing and several other crawlers still honour it). A Sitemap: line, which can appear anywhere in the file and applies site-wide regardless of which user-agent group it's near, points crawlers to your XML sitemap so they can discover pages more efficiently than by following links alone.
Getting robots.txt wrong is one of the most common self-inflicted SEO mistakes, because a single misplaced rule can accidentally de-index an entire site: a stray `Disallow: /` under `User-agent: *` — which blocks every path for every crawler — is a frequent culprit found on sites that mysteriously vanish from search results. This is why this tool offers three presets as safe starting points: "Allow all", which produces a file with no Disallow rules at all (equivalent to having no robots.txt, but useful as an explicit statement of intent); "Block all", the deliberate opposite — every crawler blocked from every path, appropriate only for staging or development environments that should never be indexed; and "WordPress default", which blocks the standard `/wp-admin/` directory while explicitly allowing `/wp-admin/admin-ajax.php`, matching the file WordPress itself generates for a typical production site.
A few things worth knowing before publishing: robots.txt controls crawling, not indexing — a page blocked from crawling can still appear in search results (typically with no description) if other sites link to it, since Google can see the URL exists even without fetching its content; to actually keep a page out of search results, use a `noindex` meta tag or HTTP header on the page itself, which requires the page to be crawlable in the first place (a contradiction worth double-checking if you're trying to solve both problems). Directives are also case-sensitive and path-based, not full-URL matched, and the more specific rule generally wins when Allow and Disallow overlap on the same path — most crawlers apply the longest matching rule, not simply the last one listed.
Details & Tips
Output format:
User-agent: {agent}
Allow: {path}
Disallow: {path}
Crawl-delay: {seconds}
(blank line between groups)
Sitemap: {url}
Worked example — WordPress default preset:
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Sitemap: https://example.com/sitemap.xml
Edge cases handled automatically: a path typed without a leading slash (e.g. "private" instead of "/private") is auto-prefixed with "/" before being written to the output. A user-agent group with no Allow or Disallow rules at all is written with an implicit "Disallow:" (empty value), which is the standard robots.txt syntax meaning "nothing disallowed — allow everything" for that agent. A non-numeric or blank Crawl-delay is simply omitted from that group's output rather than writing an invalid line. Multiple user-agent groups are separated by a blank line, matching the format search engines expect. The Sitemap line is only included when a URL is entered, and is written once at the end of the file regardless of how many user-agent groups exist above it.
Frequently Asked Questions
What is a robots.txt file for?
It tells web crawlers (search engines, SEO bots, archivers) which parts of your site they may or may not request. It must be placed at the root of your domain, e.g. example.com/robots.txt, to be recognised.
Does robots.txt stop a page from appearing in Google search results?
Not reliably. Robots.txt controls crawling, not indexing — a blocked page can still show up in search results (often with no description) if other sites link to it. To keep a page out of search results, use a noindex meta tag on the page itself instead, and make sure the page is crawlable so the crawler can see that tag.
Does Google respect the Crawl-delay directive?
No, Googlebot ignores Crawl-delay entirely and controls its crawl rate through Google Search Console settings instead. Bing and several other crawlers do honour it, which is why this tool still includes it as an optional field.
Is robots.txt a security tool?
No. It is a voluntary, publicly readable request that well-behaved crawlers choose to respect — it has no enforcement mechanism. Anything listed under Disallow is still publicly accessible to anyone who knows or guesses the URL, and malicious bots ignore the file entirely. Never rely on robots.txt to hide sensitive content.
What does the "WordPress default" preset block?
It disallows the /wp-admin/ directory (the admin dashboard) while explicitly allowing /wp-admin/admin-ajax.php, since many WordPress plugins and themes rely on that specific file for front-end AJAX requests even though it sits inside the otherwise-blocked directory.
What happens if I accidentally block everything?
A "Disallow: /" rule under "User-agent: *" blocks every crawler from every page on your site — one of the most common accidental causes of a site vanishing from search results. Double-check your output before publishing, or start from the "Allow all" preset if you are unsure.
Do I need a robots.txt file if I want everything crawled?
Not strictly — a missing robots.txt is treated the same as an "allow everything" file by most crawlers. Some sites still publish an explicit "Allow all" file (no Disallow rules) so there is no ambiguity, and so the Sitemap: line has somewhere to live.
Where do I upload the robots.txt file?
It must be saved as exactly "robots.txt" and placed at the root of your domain (not in a subfolder) — for example https://example.com/robots.txt. Most hosting control panels or your site's file manager/FTP client can place it there directly.
Can I have different rules for different search engines?
Yes — add a separate User-agent group for each bot you want to target specifically (e.g. "Googlebot", "Bingbot"), with its own Allow/Disallow rules. A crawler follows the most specific group that names it; anything only under "User-agent: *" applies to every crawler without its own dedicated group.
Does this tool check whether my paths actually exist on my site?
No — it only builds correctly formatted robots.txt syntax from the paths you type. It does not know your site's actual URL structure, so double-check that each path matches a real section of your site before publishing.
Is my data sent anywhere when I use this generator?
No. The entire file is built in your browser using JavaScript — nothing you enter is transmitted, logged, or stored.
Part of These Collections
Also Available As
robots.txt generator, robots txt generator, create robots.txt, robots.txt file generator, wordpress robots.txt generator, disallow generator
Found a Problem?
Let us know if something with Robots.txt Generator isn't working as expected.
Something went wrong. Please try again.
Thanks — we'll take a look.