Robots.txt Generator
Generate robots.txt files
Rules — path prefixes (one per row)
Common ones: /admin/ · /cart · /search · /*?s= (query searches) · /*.pdf$ (all PDFs). * = wildcard, $ = end anchor.
Bot presets — click to add a dedicated group
robots.txt — live preview
Upload this file as https://yoursite.com/robots.txt — it must live at the site root. It takes effect within ~24h of Googlebot's next fetch.
How robots.txt actually works ⌄
- It's advisory, not a lock. Compliant crawlers obey it; malicious scrapers ignore it entirely. Sensitive content needs authentication, not robots.txt.
- Blocking ≠ removing from Google. A blocked URL can still appear in results (without a snippet) if other pages link to it. To remove from the index, use
noindex— which requires the page to be crawlable. - Don't block CSS/JS. Googlebot needs them to render pages properly; blocking
/wp-admin/is fine, but blocking/wp-includes/hurts how Google sees your layout. - Crawl-delay is ignored by Google and respected mainly by Bing/Yandex. To slow Googlebot, use the crawl-rate setting in Search Console instead.
- Longest-match wins between Allow and Disallow:
Allow: /blogbeatsDisallow: /for URLs under /blog, regardless of line order. - AI-bot blocking only stops compliant AI crawlers (OpenAI, Anthropic, Common Crawl honor it). It cannot stop scraping that ignores robots.txt.
About this tool
This free Robots.txt Generator builds the small text file that controls what search-engine crawlers may and may not request on your site — through a visual builder instead of hand-typed syntax. Choose presets that cover the situations that actually occur (allow everything, block everything, WordPress-specific defaults, block admin and search paths), then refine with per-user-agent rules: allow or disallow path patterns one row at a time, set a crawl-delay for crawlers that hit too hard, and declare your sitemap's location so crawlers find everything important faster. The output updates live as you toggle, and a plain-English summary beneath each rule tells you what it actually does — because the file's power is matched by its capacity for silent disaster. That capacity is the reason a generator earns its keep: robots.txt is the one file on a website where a single stray character can erase a site from search results overnight. A 'Disallow: /' with nothing after it blocks the entire site. A missing slash, a wildcard in the wrong place, or a Disallow meant for one bot applied to all of them has taken down live sites, full stores and entire careers of embarrassing headlines — Google itself once deindexed roughly 90,000 sites this way for a week. The deeper subtlety most guides skip: robots.txt is a *request*, not a lock. Legitimate crawlers obey it; malicious scrapers read it like a treasure map. It also does not remove pages already indexed — deindexing requires noindex meta tags or the removal tool, and blocking in robots.txt while a page's URL is widely linked actually *keeps* the URL appearing in results, just as a bare, unsummarized listing. The tool's presets and summaries are built around these traps: block pages with noindex tags, hide results with removal tools, and let robots.txt do what it's actually for — crawl-budget guidance for well-behaved bots. The workflows this tool fits span every kind of site operations: the WordPress admin excluding /wp-admin/ and internal search pages (the /?s= URLs that generate crawl-budget-hungry duplicates); the e-commerce manager blocking filtered and sorted product-listing URLs — the faceted-navigation pages that can outnumber real products a hundred to one; the staging-site owner blocking an environment entirely (paired with noindex, so it doesn't leak into results); the publisher declaring sitemap locations so fresh articles get discovered in minutes rather than days; the site owner setting crawl-delay for aggressive bots that slow shared hosting; and the SEO letting Googlebot-Image crawl product imagery while blocking image-only indexing of a design portfolio. Every rule generated is commented, and the file comes with a link to Google's robots.txt tester so the final check is one paste away. Everything runs locally in your browser. Every rule is generated by client-side JavaScript on your device — your paths and settings never reach a server, are never logged and never stored. Disconnect from the internet after the page loads and the generator keeps working. Close the tab and nothing remains anywhere.
Frequently asked questions
What is robots.txt and does my website need one?+
Robots.txt is a plain text file at your site's root (example.com/robots.txt) telling well-behaved crawlers which paths they may request. Every site doesn't need one — a site with nothing to hide can omit it and crawlers index everything by default. You need one the moment you have paths worth excluding: admin areas, internal search results, filtered product listings, staging copies, or a sitemap to declare. It takes effect only for the domain it's served from and must live at the exact root path — a robots.txt anywhere else is simply ignored. The generator covers the default case too: an 'allow all' file is a perfectly valid output when you want the sitemap declaration without exclusions.
What does 'Disallow: /' mean — and why is it dangerous?+
'Disallow: /' tells every crawler not to request anything on the site — the entire domain, in one line. It's the correct setting for a staging environment, and an unmitigated disaster when left on a live site: search engines will gradually drop every page from results. This has happened at scale — a major hosting platform once blocked 90,000 sites for nearly a week through exactly this line, wiping them from Google until the fix propagated. The generator's presets make the all-block option impossible to trigger accidentally: it's clearly labeled 'Block everything (staging only)', and the plain-English summary repeats what each line does so a review takes seconds, not a nightmare.
Does robots.txt remove pages from Google search results?+
No — and this is the most consequential misunderstanding in SEO. Blocking a URL in robots.txt stops crawlers from *fetching* it, but if the URL is linked from elsewhere on the web, Google can still show the bare URL in results — just without title or description, since it can't read the page. To actually remove a page from results: use a noindex meta tag (which requires crawling, so no robots.txt block on it), the search engine's URL-removal tool for urgent cases, or delete the page so it returns 404/410. Robots.txt is for crawl-budget management — telling crawlers where to spend their time — while noindex controls results-page presence. The two tools do different jobs, and confusing them leaves pages either blocked-but-listed or unblocked-but-ignored.
Where do I put the robots.txt file and how do I test it?+
Upload it to your domain's web root so it answers at exactly https://yourdomain.com/robots.txt — not in a subdirectory, not with a filename variant. On WordPress it's the root folder (some SEO plugins generate it dynamically); on static hosts it belongs in the output folder alongside index.html; on Shopify and similar platforms it's partially auto-managed with editable extensions. To test: Google Search Console's robots.txt Tester shows how Googlebot parses your file and flags which URLs are allowed or blocked — paste your generated file, and any misunderstanding between what you intended and what the syntax says appears before it costs anything. The file also updates in Google's cache over about 24 hours, so give changes a day to take effect.
What is crawl-delay and should I set one?+
Crawl-delay asks crawlers to pause a set number of seconds between requests — useful when a bot's crawling pace slows a shared or small server. Reasonable values run from 5 to 30 seconds; too high and your fresh content takes ages to be revisited, too low and the directive does nothing. Two complications: Google officially ignores crawl-delay (its rate-limiting adjusts automatically to server response — if Googlebot slows your site, the fix is in Search Console's settings), while Bing and Yandex honor it. Set it selectively for the aggressive non-Google bots that actually cause load. The generator writes the directive correctly per user-agent, so the polite request reaches exactly the bots that will listen.
How do I block AI crawlers like GPTBot from my site?+
By name, in a user-agent group — AI crawlers are individual bots with declared names: GPTBot and OAI-SearchBot (OpenAI), ClaudeBot (Anthropic), Google-Extended (Google's AI-training crawler — distinct from regular Googlebot), CCBot (Common Crawl, which feeds many models), and Bytespider among others. Blocking them is legitimate and simply done: one user-agent line plus a Disallow rule each. Worth understanding before you decide: blocking GPTBot keeps your content out of OpenAI's future training and retrieval, while regular Googlebot indexing keeps you in search — they're separate bots, so search visibility doesn't require allowing AI training crawlers. Add each bot as its own group with explicit rules; the generator supports multiple user-agent groups so mixed policies — allow search engines, block AI training — come out correct in one file.
What should WordPress sites put in robots.txt?+
The WordPress essentials: disallow /wp-admin/ (with an explicit allow for admin-ajax.php, which lives in that directory but is needed by some front-end features), disallow internal search results paths (/?s= and /search/) that generate infinite crawlable duplicate URLs, and declare your sitemap location. Block /wp-content/plugins/ only if you understand the trade-off — blocking it prevents plugin scripts and styles from being crawled, which can affect how Google renders pages. The generator includes a WordPress preset with exactly these decisions made sensibly, which you can then adjust — and the plain-English summaries make each line's effect reviewable before you ship the file.
Is anything I configure in this generator sent to a server?+
No — nothing leaves your device. Every rule is generated entirely in your browser with client-side JavaScript: the paths and settings you choose are never transmitted to any server, never logged and never stored. You can verify it directly: after the page loads, disconnect from the internet and the generator keeps working, which is only possible because no network is involved. Close or refresh the tab and everything is gone — no history kept on this site or anywhere else.