On this page
- What this generator does and how it builds rules
- How the Robots Exclusion Protocol works (RFC 9309)
- Managing AI crawlers vs. traditional search engines
- Robots.txt vs. meta noindex vs. HTTP authentication
- Managing crawl budget and server load at scale
- Complete directives, wildcards (*), and anchor ($) reference
- Three worked robots.txt configurations
- Deployment checklist, size limits, and live testing
- Seven costly robots.txt mistakes and how to fix them
- Where this tool stops and technical disclaimer
- Sources
What this generator does and how it builds rules
This tool takes your selections for global crawl access, individual search engine crawlers, AI data-collection bots, restricted folder prefixes, exception paths, crawl delay, and sitemap location, and compiles them into a root-ready robots.txt file inside your browser. You can switch between four common presets to inspect a baseline configuration, edit any checkbox or path list manually, review the summary diagnostics, and copy or download the finished plain-text file ready for upload to your domain root.
Understanding what the generator produces—and equally what robots.txt cannot do—matters before pushing changes to production. A single misplaced slash inside a wildcard group can de-crawl an entire storefront or editorial archive overnight, while assuming that Disallow hides sensitive files leaves private dashboards exposed to anyone who inspects the file directly. The guide below walks through how modern parsers evaluate your rules under RFC 9309, how search engines treat AI opt-out tokens differently from search crawlers, and how to deploy and verify your live file safely.
Everything runs locally inside your browser tab without saving domains or URL paths to any external server. Only if you manually press the optional AI insight button is an anonymous numeric summary (such as total directive lines, blocked bot count, and whether a sitemap line is present) sent to a stateless endpoint for a quick rule review. Your site domain, private paths, and generated file contents stay strictly on your device.
How the Robots Exclusion Protocol works (RFC 9309)
Originally drafted in 1994 and formally standardized by the IETF as RFC 9309 in September 2022, the Robots Exclusion Protocol (REP) gives website owners a predictable way to signal crawl permissions to automated agents. Before requesting pages on a host, a compliant crawler requests https://example.com/robots.txt and checks which paths are open or closed to its declared User-agent token.
Two parsing rules trip up site owners more often than anything else: group isolation and longest-match specificity. First, a crawler selects only the single most specific matching User-agent group in your file; it does not combine rules from the wildcard User-agent: * group with rules from a named block like User-agent: Googlebot. If you create a dedicated Googlebot group with Disallow: (empty) and separately place Disallow: /admin/ only under User-agent: *, Googlebot ignores the wildcard group completely and crawls /admin/ unless that disallow rule is repeated inside Googlebot's own block. Notice how the AfriWidget generator keeps User-agent: Googlebot clean when allowed so your named overrides stay unambiguous, while applying path restrictions under User-agent: *—and reminds you if you need identical path exclusions inside specific agent blocks.
Second, within the selected group, the longest matching path pattern wins rather than whichever line comes first. If one rule says Disallow: /private/ (9 characters) and another says Allow: /private/public/ (16 characters), a request for /private/public/guide.html matches the longer Allow pattern and proceeds. If an Allow rule and a Disallow rule happen to share the exact same pattern length for a URL, RFC 9309 resolves the tie in favor of Allow.

200, 4xx, 5xx) to group selection and longest-path matching.The HTTP status code returned when a crawler requests /robots.txt changes everything—even before a single rule is read. Understanding how search engines handle non-200 responses prevents silent outages during firewall changes or server migrations:
| HTTP status at /robots.txt | Crawler interpretation (Google & RFC 9309) | Operational risk |
|---|---|---|
200 OK (plain text) | File is parsed line-by-line up to the 500 KiB limit; matching group rules govern every subsequent fetch. | Misconfigured Disallow: / pauses search indexing across the entire host. |
301 / 302 Redirect | Google follows up to 5 redirect hops to locate a live robots.txt on the canonical or external host. | Redirect loops or chains exceeding 5 hops are treated as unavailable (4xx/5xx fallback). |
404 / 410 (4xx Client Error) | Treated as no robots restrictions present; crawlers assume all public URLs are allowed. | Crawler budgets may be wasted on unblocked staging, cart, or filter URLs. |
500 / 503 (5xx Server Error) | Compliant bots assume the server is overloaded and temporarily halt all crawling for the host. | Extended 5xx errors on /robots.txt stop Googlebot and Bingbot from discovering or refreshing any page. |
Check firewall rules carefully. A misconfigured security rule or CDN challenge page that serves HTTP 503 or an HTML challenge to automated requests on /robots.txt can halt search engine crawling across your whole domain even while human visitors browse pages normally.
Managing AI crawlers vs. traditional search engines
Historically, robots.txt governed a handful of search indexers such as Googlebot and Bingbot. Over the past few years, however, automated traffic has split into distinct categories: classic web search crawlers that index pages for search results, AI model training crawlers that ingest text to build foundation models, and live AI retrieval/citation bots that fetch pages when a user asks an assistant a question.
Blocking every bot indiscriminately often backfires. A business that accidentally blocks Googlebot or Bingbot vanishes from organic search results, whereas a publisher that only wants to opt out of foundational AI training can target training tokens specifically while keeping search indexing untouched. Knowing which token controls which pipeline lets you set deliberate policies rather than guessing:

One token in particular deserves close attention: Google-Extended is a standalone opt-out token, not a crawl user-agent. Google does not send a separate crawler whose HTTP header says Google-Extended; instead, Google checks whether Google-Extended is disallowed inside robots.txt to decide whether content crawled by Googlebot may be used to help improve Gemini models and Vertex AI grounding, without removing the site from Google Search. Similarly, OpenAI distinguishes GPTBot (model training) from search-citation crawlers, while Anthropic uses ClaudeBot for training ingestion and Common Crawl publishes open web snapshots via CCBot.
Remember also that RFC 9309 compliance is voluntary. Major search companies and transparent AI labs respect robots.txt to protect ecosystem trust and legal compliance, whereas anonymous scrapers, credential-stuffing bots, or bandwidth-abusive scripts rarely fetch robots.txt at all. Use robots.txt to set clear public terms for compliant AI and search agents, and pair it with CDN rate-limiting or web application firewall rules to stop abusive non-compliant scraping.
Robots.txt vs. meta noindex vs. HTTP authentication
The single most damaging misunderstanding in technical SEO is treating Disallow inside robots.txt as a way to remove pages from Google or hide confidential records. In reality, robots.txt controls crawling (whether a bot may fetch the URL), not indexing (whether the URL can appear in search results).
When another website or an internal menu links to https://example.com/internal-report and your robots.txt contains Disallow: /internal-report, Googlebot skips downloading the page. Because Googlebot still saw the inbound anchor text and URL, it can index the bare URL anyway—displaying a search snippet that reads "No information is available for this page"—and it will never see a <meta name="robots" content="noindex"> tag sitting inside the page's HTML <head> because crawling was blocked!

Follow the right workflow for each objective:
- Save server bandwidth on low-value URLs: Block infinite filter combinations, internal search pages (
/search/), cart endpoints, and tracking query strings inrobots.txtso crawlers spend requests on canonical content instead. - Remove an already-indexed URL from Google or Bing: Leave the URL crawlable (do not disallow it yet), add
<meta name="robots" content="noindex">or an HTTP headerX-Robots-Tag: noindex, confirm removal in Search Console, and only later block crawling if needed. - Protect private, staging, or customer data: Put the folder or staging subdomain behind HTTP Basic Auth (
401 Unauthorized), session login checks, or VPN/IP allowlists. Never rely onrobots.txtfor privacy, because/robots.txtitself is public and frequently read by reconnaissance scanners looking for hidden paths like/admin-backup/.
Managing crawl budget and server load at scale
For small brochure websites under a few thousand pages, search engines normally crawl every useful URL comfortably without running out of capacity. Crawl budget—the balance between a host's crawl capacity limit (how fast bots can fetch without slowing your server) and crawl demand (how worth-crawling search engines judge your URLs)—becomes critical once a site expands to tens of thousands of URLs, runs an e-commerce catalog, or publishes frequent updates on modest shared hosting.
Left unchecked, faceted product filters (/shoes?color=black&size=42&sort=price), calendar pagination loops, and internal search query strings generate hundreds of thousands of near-duplicate URLs. Crawlers waste server CPU and database queries on worthless permutations while fresh product pages or new articles wait days to get discovered.
Two tactical levers help manage this cleanly inside robots.txt:
- Pattern exclusions on parameter traps: Use targeted disallow rules (such as
Disallow: /search/or wildcard query blockers likeDisallow: /*?filter=) while keeping CSS, JS, and product images unblocked so search engines can still render core pages accurately. - Selective
Crawl-delayfor non-Google engines: AddingCrawl-delay: 5orCrawl-delay: 10asks Bingbot and YandexBot to pause 5 or 10 seconds between consecutive requests on fragile hosting. Remember that Googlebot ignoresCrawl-delaycompletely—to reduce Googlebot's request rate when a server struggles, check your origin server speed (returning HTTP503briefly if saturated prompts automatic backoff) or review crawl settings inside Google Search Console.
Complete directives, wildcards (*), and anchor ($) reference
Every rule generated by this tool follows the standard line-by-line directive syntax supported by major search engines. Below is the complete directive and pattern-matching reference, including wildcards you can paste straight into the tool's Disallowed paths or Allowed paths inputs:
| Directive or token | Meaning & matching rule | Example | Engine support |
|---|---|---|---|
User-agent: <name> | Starts a rule group targeting a specific crawler token or * for all unnamed bots. Case-insensitive prefix match. | User-agent: GPTBot | All REP-compliant crawlers (RFC 9309) |
Disallow: <path> | Blocks crawling of URLs starting with the path prefix. An empty Disallow: allows everything in the group. | Disallow: /admin/ | All REP-compliant crawlers |
Allow: <path> | Explicitly permits crawling of a matching subpath, overriding a shorter Disallow inside the same group. | Allow: /private/public-guide/ | RFC 9309, Google, Bing, Yandex |
* (Wildcard) | Matches any sequence of zero or more characters inside a path pattern (case-sensitive path matching). | Disallow: /*?sort= | RFC 9309, Google, Bing, Yandex |
$ (End anchor) | Matches the exact end of the URL string so suffixes do not match accidentally in the middle of a path. | Disallow: /*.pdf$ | RFC 9309, Google, Bing, Yandex |
Crawl-delay: <sec> | Instructs bots to wait N seconds between requests. | Crawl-delay: 10 | Bing, Yandex (Ignored by Google) |
Sitemap: <url> | Declares the full absolute URL of an XML sitemap or sitemap index anywhere in the file. | Sitemap: https://example.com/sitemap.xml | Google, Bing, Yandex (sitemaps.org) |
Always watch path trailing slashes and case sensitivity. Disallow: /blog blocks /blog, /blog/post, and /blogger-program because matching is prefix-based. If you only want to block a folder, add the trailing slash: Disallow: /blog/. Equally, URL paths are case-sensitive under RFC 9309: Disallow: /Admin/ will not block /admin/.
Three worked robots.txt configurations
Real websites rarely use a one-size-fits-all template. Below are three realistic scenarios showing how to configure the generator controls for different publishing goals and how the resulting file behaves.
Allow search engines, protect admin/search routes, and block AI model training
A technology blog running on a single domain wants strong visibility on Google and Bing, needs internal search results and CMS previews excluded from crawl budget, and wants to opt out of AI training datasets without affecting Google Search rankings.
Tool settings: Set Global Access to Allow all bots by default; check Googlebot and Bingbot (allowed); leave GPTBot, ClaudeBot, CCBot, Bytespider, and Google-Extended unchecked so named block groups are generated; enter /wp-admin/, /search/, /preview/ in Disallowed paths; add /wp-admin/admin-ajax.php in Allowed paths if your theme depends on it; and paste https://example.com/sitemap.xml.
Outcome: Search crawlers index every public article cleanly, AJAX functionality stays reachable for rendering, and named AI training bots receive explicit opt-out rules.
Stop facet-parameter traps while keeping products and images crawlable
An online shop with 1,200 products notices 90,000 parameterized URLs appearing in server logs because visitors and bots follow sort, currency, and multi-attribute filter links (/shop?sort=asc&color=gold). Server CPU spikes whenever Bingbot scans filter pages.
Tool settings: Keep Global Access at Allow all bots by default; include key search and retrieval bots you want active; paste /cart/, /checkout/, /account/, /*?sort=, /*?filter= into Disallowed paths; select a 5 seconds Crawl delay if Bing/Yandex load needs smoothing; and include your canonical product sitemap URL.
Outcome: Crawlers skip checkout flows and infinite query permutations while continuing to fetch canonical product pages, category archives, JavaScript, and product photos.
Temporary full crawl block during migration—paired with password protection
An agency launches staging.example.com for client sign-off before pointing DNS or migrating pages live. The client asks to block all search engines and AI bots temporarily.
Tool settings: Set Global Access to Block all bots by default, leave every bot toggle unchecked, and omit any sitemap URL so every group outputs Disallow: /.
Critical operational reminder: Remember to delete or replace this file with an open policy the moment the site launches to production—and while in staging, place an HTTP Basic Auth login wall in front of the staging host rather than relying solely on robots.txt so pre-launch pages cannot be accessed by visitors or indexed via external links.
Deployment checklist, CDN caching, platform pitfalls, and live testing
Uploading a valid file to the wrong directory, letting a CDN cache an outdated rule for weeks, or serving HTML from a CMS rewrite silently voids every rule you wrote. Verify these six technical and platform checks immediately after deploying:
- Exact root path per host and subdomain: The file must live at
https://yourdomain.com/robots.txt(all lowercase). Subdomains (blog.yourdomain.com,www.yourdomain.com,shop.yourdomain.com) and alternate ports or protocols require their own independent/robots.txt; placing a file in/blog/robots.txthas zero effect on either the apex domain or a subfolder. - Content-Type & UTF-8 encoding: Serve the file as plain text (
Content-Type: text/plain; charset=utf-8) without a UTF-8 Byte Order Mark (BOM) or HTML template wrapper. Custom 404 or single-page-app rewrite rules (common on React/Vite or Apache.htaccesssetups) that accidentally rewrite/robots.txttoindex.htmlbreak directive parsing immediately. - Platform defaults and edge-injection conflicts: In WordPress, a real physical
robots.txtfile in your public root overrides WordPress's built-in virtual file, whereas SEO plugins often manage virtual rules in the database; never mix both without checking which one actually renders live. On Cloudflare or managed hosts, inspect edge settings (such as "Block AI bots" toggles or managedrobots.txtprepends) that automatically inject header rules ahead of your uploaded file, because conflictingUser-agent: *or bot groups inserted at the CDN layer can override your intended behavior. - Keep CDN cache TTLs short (1 to 4 hours): Aggressive caching on
/robots.txtdelays emergency fixes if an unintended disallow ships to production. Set a moderate cache header such asCache-Control: public, max-age=3600and purge CDN edge cache immediately after editing. - Under the 500 KiB file ceiling: RFC 9309 mandates minimum parser support of 500 kibibytes, and Google discards directives past 500 KiB. Prefix rules like
Disallow: /archive/keep files lean—almost always well under 5 KB. - Test live URLs in Search Console: Open Settings → robots.txt inside Google Search Console to inspect the timestamp of Google's most recent fetch, check for syntax warnings, and confirm HTTP
200status. Inspect your homepage and a flagship article in Search Console's live URL Inspection tool and view the rendered screenshot to verify that no CSS, web fonts, API endpoints, or hero images were inadvertently blocked. Pair clean crawl controls with accurate discovery maps built in the XML Sitemap Generator.
Seven costly robots.txt mistakes and how to fix them
- 1. Leaving
Disallow: /live after staging goes public. This is the single most common post-launch traffic collapse. Fix it by maintaining separate environment deployment configs so staging rules are never pushed to production, and checking/robots.txtin every launch checklist. - 2. Blocking CSS, JavaScript, or image folders like
/assets/or/wp-includes/. Search engines render modern pages in headless browsers. Blocking styling or scripts breaks mobile usability checks and hides dynamic content. Always keep render-critical assets crawlable. - 3. Blocking a page in
robots.txtwhen trying to de-index it withnoindex. Crawlers cannot read anoindexmeta tag or HTTP header on a blocked URL. Remove theDisallowrule temporarily, let search engines recrawl and drop the URL, and inspect coverage before re-blocking if needed. - 4. Forgetting that named
User-agentgroups do not inherit wildcard rules. If you write a custom block forUser-agent: Googlebot, Googlebot completely ignores everyDisallowline sitting underUser-agent: *. Repeat any essential path exclusions inside every custom named group you create. - 5. Adding query-string parameters without wildcards or forgetting trailing slashes. Writing
Disallow: /adminalso blocks/administration-services. Append a trailing slash (/admin/) for folder rules and use wildcards (/*?sort=) for parameters. - 6. Relying on
Crawl-delayto slow down Googlebot. Google ignoresCrawl-delayentirely. Optimize server caching/CDN performance or manage crawl rate feedback through Search Console and proper HTTP status codes instead. - 7. Treating
robots.txtlike a security firewall. PuttingDisallow: /secret-export.csvbroadcasts the exact path of sensitive files to anyone who fetches/robots.txt. Enforce real authentication (401/403) on private endpoints and never list confidential URLs in public crawl hints.
Where this tool stops and technical disclaimer
Scope and limitations: This generator constructs syntactically clean robots.txt files strictly from the toggles, path patterns, crawl delay, and sitemap URL you enter in your browser. It does not probe your live web server, verify whether your server returns 200 OK with text/plain MIME headers, check your hosting CMS rewrite rules, crawl your site to verify whether listed paths exist, or simulate interaction between your rules, canonical link tags, noindex directives, and CDN WAF settings.
No legal or security guarantee: Because the Robots Exclusion Protocol is a voluntary technical standard, blocking an AI crawler or search user-agent signals your preference to compliant organizations only; it cannot physically stop unauthorized scrapers, bypass authentication flaws, or substitute for legal terms of service, licensing agreements, or copyright counsel. Always test generated directives in Google Search Console and Bing Webmaster Tools before relying on them in production, and secure sensitive resources with server-side access control.
Sources
- RFC 9309 (IETF). Robots Exclusion Protocol. rfc-editor.org
- Google Search Central. Introduction to robots.txt and how Google interprets the specification. developers.google.com
- Google Search Central. Overview of Google crawlers and Google-Extended controls. developers.google.com
- Bing Webmaster Guidelines. How to create and test a robots.txt file. bing.com/webmasters
- OpenAI Platform Docs. GPTBot crawler documentation and robots.txt controls. platform.openai.com
- sitemaps.org. Sitemaps XML Protocol: Specifying the Sitemap location in robots.txt. sitemaps.org