SEO and Webmaster Tool

Robots.txt Generator Create Crawl Rules for Search Engines and AI Bots

Build a root-ready robots.txt file with search engine controls, AI crawler blocks, crawl delay, disallowed paths, and sitemap support. Runs entirely in your browser.

Last Updated: 26 November 2026

Configure your robots.txt

Pick a starting point, adjust the rules, then generate, copy, or download the file.

Global Access
AI Crawler Access
Search Engine Access
Paths & Sitemap (Optional)

Generated robots.txt
Ready
Built locally from the options above.
Blocked bots0Named agents blocked
Allowed bots0Named agents allowed
Directives0Lines in the file
What this usually means

—

Generated file

File checks

Wildcard User-agent group is present—
A sitemap line is included—
At least one path directive is present—

Optional AI insight

A short written read on the rules you have selected, what a search engine will and will not see, and one change that would matter most for the site. Nothing leaves your browser until you press the button.

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.

Decision flowchart showing how a crawler fetches robots.txt, checks HTTP status codes 200, 4xx, and 5xx, matches the most specific User-agent group, and resolves longest-match Allow or Disallow rules
Figure 1: Crawler decision path under RFC 9309—from HTTP status code handling (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.txtCrawler 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 RedirectGoogle 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:

Taxonomy chart comparing search engine indexers (Googlebot, Bingbot, YandexBot) against AI training crawlers (GPTBot, ClaudeBot, CCBot, Bytespider) and hybrid search or opt-out tokens (PerplexityBot, Google-Extended)
Figure 2: Separating traditional search indexers from AI training crawlers and product-specific opt-out tokens lets publishers protect training rights without sacrificing search traffic.

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!

Side-by-side comparison matrix contrasting robots.txt Disallow (stops crawling only), meta noindex or X-Robots-Tag (drops from search index while allowing crawl), and HTTP Authentication or 401/403 gate (true security blocking humans and bots)
Figure 3: Choose the right control mechanism for your goal—crawl budget management, search de-indexing, or private access security.

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 in robots.txt so 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 header X-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 on robots.txt for privacy, because /robots.txt itself 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 like Disallow: /*?filter=) while keeping CSS, JS, and product images unblocked so search engines can still render core pages accurately.
  • Selective Crawl-delay for non-Google engines: Adding Crawl-delay: 5 or Crawl-delay: 10 asks Bingbot and YandexBot to pause 5 or 10 seconds between consecutive requests on fragile hosting. Remember that Googlebot ignores Crawl-delay completely—to reduce Googlebot's request rate when a server struggles, check your origin server speed (returning HTTP 503 briefly 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 tokenMeaning & matching ruleExampleEngine support
User-agent: <name>Starts a rule group targeting a specific crawler token or * for all unnamed bots. Case-insensitive prefix match.User-agent: GPTBotAll 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: 10Bing, 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.xmlGoogle, 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.

Example 1 · Independent Editorial Blog

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.

User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: CCBot Disallow: / User-agent: Google-Extended Disallow: / User-agent: * Disallow: Disallow: /wp-admin/ Disallow: /search/ Disallow: /preview/ Allow: /wp-admin/admin-ajax.php Sitemap: 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.

Example 2 · Growing E-Commerce Catalog

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.

User-agent: * Disallow: Disallow: /cart/ Disallow: /checkout/ Disallow: /account/ Disallow: /*?sort= Disallow: /*?filter= Crawl-delay: 5 Sitemap: https://shop.example.com/sitemap.xml

Outcome: Crawlers skip checkout flows and infinite query permutations while continuing to fetch canonical product pages, category archives, JavaScript, and product photos.

Example 3 · Pre-Launch or Private Staging Site (With Auth Caution)

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: /.

User-agent: * 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:

  1. 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.txt has zero effect on either the apex domain or a subfolder.
  2. 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 .htaccess setups) that accidentally rewrite /robots.txt to index.html break directive parsing immediately.
  3. Platform defaults and edge-injection conflicts: In WordPress, a real physical robots.txt file 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 managed robots.txt prepends) that automatically inject header rules ahead of your uploaded file, because conflicting User-agent: * or bot groups inserted at the CDN layer can override your intended behavior.
  4. Keep CDN cache TTLs short (1 to 4 hours): Aggressive caching on /robots.txt delays emergency fixes if an unintended disallow ships to production. Set a moderate cache header such as Cache-Control: public, max-age=3600 and purge CDN edge cache immediately after editing.
  5. 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.
  6. 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 200 status. 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.txt in 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.txt when trying to de-index it with noindex. Crawlers cannot read a noindex meta tag or HTTP header on a blocked URL. Remove the Disallow rule temporarily, let search engines recrawl and drop the URL, and inspect coverage before re-blocking if needed.
  • 4. Forgetting that named User-agent groups do not inherit wildcard rules. If you write a custom block for User-agent: Googlebot, Googlebot completely ignores every Disallow line sitting under User-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: /admin also blocks /administration-services. Append a trailing slash (/admin/) for folder rules and use wildcards (/*?sort=) for parameters.
  • 6. Relying on Crawl-delay to slow down Googlebot. Google ignores Crawl-delay entirely. Optimize server caching/CDN performance or manage crawl rate feedback through Search Console and proper HTTP status codes instead.
  • 7. Treating robots.txt like a security firewall. Putting Disallow: /secret-export.csv broadcasts 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

  1. RFC 9309 (IETF). Robots Exclusion Protocol. rfc-editor.org
  2. Google Search Central. Introduction to robots.txt and how Google interprets the specification. developers.google.com
  3. Google Search Central. Overview of Google crawlers and Google-Extended controls. developers.google.com
  4. Bing Webmaster Guidelines. How to create and test a robots.txt file. bing.com/webmasters
  5. OpenAI Platform Docs. GPTBot crawler documentation and robots.txt controls. platform.openai.com
  6. sitemaps.org. Sitemaps XML Protocol: Specifying the Sitemap location in robots.txt. sitemaps.org

Frequently asked questions

What is a robots.txt file?

A robots.txt file is a plain text file placed at the root of a website that tells well-behaved crawlers which paths they may request and which paths they should leave alone. It follows the Robots Exclusion Protocol, which is a voluntary standard rather than an enforcement mechanism. Every major search engine reads it before crawling, so a carefully written file can reduce wasted requests, protect server resources, and guide search engines towards the pages that matter most.

Does robots.txt hide pages from visitors?

No. A robots.txt file is public and advisory. Anyone can open it in a browser, and it does not restrict access for a human visitor who knows the URL. It only signals to compliant crawlers that a path should be skipped. For confidential or restricted content, use authentication, authorisation, or server-level access rules rather than relying on robots.txt.

Where should I upload robots.txt?

Place the file at the root of the exact host, such as https://example.com/robots.txt. A file inside a subfolder does not control the whole domain, and a file on a subdomain does not control the main site. If you run several hosts, each one needs its own robots.txt. Once the file is live, confirm it loads with the correct MIME type and without a redirect chain.

How long does Google take to apply robots.txt changes?

Google usually recrawls a robots.txt file within a day or two, but the visible effect on crawl behaviour can take longer because the crawl schedule already committed to a set of URLs. If you are trying to remove a page quickly, robots.txt alone is not the right tool. Use a noindex directive in combination with crawlability, then allow Google to see the noindex and drop the URL from the index.

Should I block all AI crawlers?

That is a publisher decision, not a technical one. Blocking agents such as GPTBot, ClaudeBot, CCBot, and PerplexityBot stops those services from training on your content through their named crawlers, but it also removes any referral traffic those services might send. Some publishers block all AI crawlers, some allow them, and some negotiate licensing terms directly. The right answer depends on your content, your audience, and your long-term plans for the site.

Can robots.txt remove a page that is already indexed?

No, and using it for that purpose usually makes things worse. If you block a URL with robots.txt, the search engine cannot crawl the page to see a noindex directive, so the URL can stay in the index without a description. The reliable sequence is to keep the page crawlable, add a noindex meta tag or X-Robots-Tag header, wait for the search engine to drop it, and only then consider blocking it with robots.txt.

Should I add a Crawl-delay directive?

Crawl-delay is supported by Bing and Yandex, but Google has stated that it does not support the directive and ignores it. If you want to slow Google down, use the crawl rate settings in Google Search Console instead. On most small and medium sites, a crawl delay is unnecessary because the search engine naturally spreads its requests. Add one only if your server is genuinely struggling under crawler load.

Can robots.txt block CSS and JavaScript files?

It can, but you should not block them. Google and Bing render pages as a user would, and they need access to CSS, JavaScript, and image assets to understand the layout, the visible content, and the mobile experience. If those files are blocked, the crawler sees an incomplete page and may misjudge how the site looks. Allow assets that are needed for rendering, and block only paths that genuinely should stay out of the crawl.

Is my robots.txt configuration sent to a server?

No. The generator runs entirely inside your browser, and the file is built locally from the options you choose. Nothing is transmitted anywhere, and nothing is stored. If you press the AI insight button, only an anonymous summary of the selected options, the number of disallowed paths, and whether a sitemap was added is sent to a small serverless function that runs once and then stops. No domain name and no personal detail is included.

Does robots.txt work the same on every search engine?

The core directives are widely supported, but the details vary. User-agent, Disallow, Allow, and Sitemap are understood by every major crawler. Crawl-delay is supported by Bing and Yandex but ignored by Google. Sitemap inside robots.txt is widely accepted but the preferred method is to submit the sitemap through the webmaster tools of each engine. Always test the live file in the webmaster tools of the engines that matter to you.

How do HTTP 404, 5xx, and 200 status codes on robots.txt affect crawling?

A 200 OK response means the crawler reads and applies the rules in the file. A 4xx response such as 404 Not Found tells search engines there is no restriction file, so they proceed as if everything is allowed. A 5xx server error signals that your server is unhealthy, causing compliant crawlers like Googlebot to temporarily pause crawling the entire domain until robots.txt returns 200 or 404.

How do wildcards (*) and end-of-URL anchors ($) work in Disallow and Allow rules?

An asterisk (*) matches zero or more instances of any character, making it useful for blocking dynamic query parameters such as Disallow: /*?sort=. A dollar sign ($) anchors the pattern to the exact end of the URL, so Disallow: /*.pdf$ blocks URLs ending in .pdf without affecting paths that merely contain .pdf earlier in the string.

Why should I use HTTP authentication instead of robots.txt for staging sites?

Staging URLs blocked only by robots.txt remain publicly readable by anyone who guesses the subdomain and can still appear in search results as bare URLs if external links point to them. Password-protecting staging with HTTP Basic Auth, IP allowlists, or a login gate blocks both unauthorized human visitors and crawlers cleanly.

Is there a maximum file size limit for robots.txt?

Yes. RFC 9309 requires parsers to support at least 500 kibibytes (500 KiB), and Google explicitly enforces a 500 KiB ceiling on robots.txt. Any rules placed beyond that limit are ignored. Keeping your file lean and grouping broad folder prefixes ensures every directive is processed reliably.

Explore more productivity and SEO tools

Alongside this robots.txt generator, there are utilities for meta pixel checks, sitemaps, SEO meta, and URL slugs. All free, all private, all running in your browser.

See all productivity tools