A robots.txt generator takes the guesswork out of one of the oldest and most misunderstood files on the web. This free tool builds a syntactically correct robots.txt in seconds — pick a preset for WordPress, ecommerce, or a fully custom rule set, decide whether to block the new wave of AI crawlers, and copy the result straight into your site's root directory.
The same handful of mistakes cause most robots.txt problems: blocking CSS and JS files that Google needs to render the page, using robots.txt to try to "hide" a page that is already indexed, and leaving a staging Disallow: / on a live site. This page explains each trap so you can check your output against it before you upload.
What This Robots.txt Generator Does
The tool builds a plain-text robots.txt file made up of one or more User-agent blocks, each followed by Allow and Disallow directives, an optional Crawl-delay, and a Sitemap line pointing search engines to your XML sitemap. Choose a preset to auto-fill sensible defaults, toggle checkboxes to add blocking rules for specific AI crawlers, and the generator assembles everything into a clean, standards-compliant file you can copy with one click.
Every rule you add is visible before you copy anything, so nothing is hidden or auto-injected. What you see in the output box is exactly what gets uploaded to your server.
How to Use It
- Pick a preset. "Allow all" is the safest default for most small sites. "WordPress standard" blocks admin and search paths while keeping content, core and plugin folders (including their CSS/JS) crawlable. "Ecommerce standard" adds cart, checkout, and account paths.
- Adjust the User-agent and paths. Leave
User-agent: *to target every crawler, or specify a single bot if you need a special rule. - Add your sitemap URL. This single line helps every search engine find your sitemap without you submitting it manually everywhere.
- Decide on AI crawlers. Check the boxes for any AI bots you want to keep out of your training data pipeline.
- Generate and copy. Click Generate, review the output, then copy it into a file named exactly
robots.txtat your domain's root.
How Robots.txt Actually Works
Robots.txt follows the Robots Exclusion Protocol, a voluntary standard that well-behaved crawlers check before requesting any page on your domain. The file lives at https://yourdomain.com/robots.txt — nowhere else — and each search engine bot reads it first, matches its own User-agent name against your rules, then decides which paths it's allowed to request. Google, Bing, and other major engines respect this protocol closely, as documented at robotstxt.org, the original specification site.
Crawling vs. Indexing — The Mistake That Breaks Sites
This is the single most important thing to understand before you touch robots.txt: robots.txt controls crawling, not indexing. Those are two different processes, and confusing them causes real damage. Crawling is Google's bot requesting a page and reading its content. Indexing is Google deciding to store that page and show it in search results. Disallowing a URL in robots.txt only stops the crawl — it does not guarantee the page stays out of search results.
Here's the trap: if other sites link to a page you've disallowed, Google can still index the URL based on that external signal, showing it in search results with no title or description, just the bare link — often worse for your brand than if you'd left it fully crawlable. Worse still, once a page is disallowed, Google's crawler can never fetch it again, which means it can never read a noindex meta tag on that page either. A page blocked in robots.txt is invisible to the very mechanism that would properly remove it from the index.
The correct fix for "I don't want this page in search results" is almost always a <meta name="robots" content="noindex"> tag on the page itself, left fully crawlable so Google can see and obey that instruction. Reserve robots.txt Disallow rules for pages you don't want crawled at all — internal search results, filtered/faceted URLs that create infinite duplicate combinations, staging environments, or admin areas — not for pages you're trying to remove from search.
The AI Crawler Question Every Publisher Now Faces
Since 2023, a new category of crawler has shown up in server logs: bots that don't index your page for search, but scrape your content to train or ground large language models. GPTBot (OpenAI), CCBot (the crawler behind the Common Crawl dataset used by many AI labs), Google-Extended (a robots.txt token, separate from Googlebot, that controls whether content Google has crawled is used to train and ground Gemini; Google says it does not affect inclusion in Google Search), ClaudeBot (Anthropic), and PerplexityBot (Perplexity AI) are the ones site owners ask about most.
There's a real trade-off here, not a clean right answer. Blocking these crawlers asks the operators to keep your content out of their AI training sets (compliance is voluntary, and a block does not remove what was already collected) — which some publishers want, especially if AI-generated answers satisfy searches without sending a click to the original page.
But blocking them also means your brand, your data, and your expertise won't surface when someone asks an AI assistant a question your content could have answered. For a business built on being found — which is most businesses — that trade-off deserves a deliberate decision, not a default. This generator makes each AI crawler an individual checkbox precisely so you choose consciously rather than copy-pasting a blanket block list you found online.
Common Robots.txt Directives Explained
- User-agent — identifies which crawler the following rules apply to.
*matches all crawlers that don't have a more specific block. - Disallow — tells the specified crawler not to request URLs matching this path. An empty value means nothing is blocked.
- Allow — carves out an exception inside a disallowed path, most commonly used to let a specific file (like a CSS or JS asset) through even though its parent folder is blocked.
- Crawl-delay — asks a bot to wait a number of seconds between requests. Google does not support it (its robots.txt documentation lists only user-agent, allow, disallow and sitemap); some other crawlers read it, but support varies by bot. Use it sparingly — a long delay can slow how quickly a crawler that honors it discovers new content.
- Sitemap — an absolute URL pointing to your XML sitemap. This is the one directive every search engine reads regardless of which User-agent block it sits under.
What NOT to Put in Robots.txt
Robots.txt is a public file. Anyone — a competitor, a security researcher, a curious visitor — can visit yourdomain.com/robots.txt and read every path you've listed. Never use a Disallow rule to try to "hide" an admin panel, a staging subdirectory with sensitive data, or an unlaunched product page. Listing the path in robots.txt often draws more attention to it than leaving it unlisted, since it publishes the exact URL structure to anyone who checks. If something genuinely needs to stay private, protect it with authentication or a firewall rule, not a text file that politely asks well-behaved bots to look away — because not every bot is well-behaved, and robots.txt is purely voluntary.
Robots.txt is one small piece of a bigger crawlability and indexing picture. Arb Digital's SEO services cover technical audits, indexation and site architecture.
See Our SEO Services All Free ToolsCommon Mistakes to Avoid
- Blocking CSS/JS folders. Google renders pages like a browser; blocking stylesheet or script directories can make Google see a broken, unstyled page and misjudge its quality.
- Using Disallow to remove indexed pages. It doesn't work reliably and can backfire — use noindex tags on a crawlable page instead.
- Forgetting the sitemap line. It costs one line and helps every crawler find your sitemap without manual submission.
- Typos in the file name or location. It must be exactly
robots.txt, lowercase, at the domain root — not in a subfolder, notRobots.TXT. - Blocking everything on a live site by accident. A leftover
Disallow: /from a staging environment is one of the most common causes of a site suddenly vanishing from search results. - Assuming robots.txt keeps a page out of search results. It only blocks crawling — see the crawling vs. indexing section above.
Related Free Tools From Arb Digital
Once your robots.txt is live, pair it with the XML sitemap generator to build the sitemap you referenced above. If you're planning URL changes, the htaccess redirect generator handles 301s the right way. Check whether a page is actually indexed with the Google cache checker, review your on-page tags with the meta tag generator, add structured data with the schema markup generator, or browse our full free online tools hub.
Worked Example With the Default Inputs
Open this page and look at the output box without changing anything (the file is generated on load; pressing Generate repeats it). These are the starting values, taken straight from the form:
- Preset: wordpress
- User-agent: *
- Sitemap URL: https://www.example.com/sitemap.xml
- Crawl-delay: empty
- AI crawler checkboxes: all five unticked
The calculator returns the following, computed by the same code that runs above:
- Status: 6 rules
- Directive lines: 6
- User-agent blocks: 1
- AI crawlers blocked: 0
- Sitemap lines: 1
The output is one User-agent: * block with five Disallow lines (/wp-admin/, /readme.html, /trackback/, /?s=, /search/), one Allow: /wp-admin/admin-ajax.php line, and a blank line followed by Sitemap: https://www.example.com/sitemap.xml. The status line reads “1 user-agent block”. Tick the five AI boxes and each adds its own block with Disallow: /, so the counts rise to 11 directive lines and 6 blocks.
How to read your result
- Directive lines counts Disallow, Allow and Crawl-delay lines plus one per blocked AI bot. It does not count User-agent or Sitemap lines.
- Replace the example sitemap URL with your real one. The default is a placeholder that does not exist.
- Keep CSS/JS crawlable. The WordPress preset deliberately leaves
/wp-includes/and/wp-content/plugins/open, because they hold scripts and styles your pages need to render. Google recommends letting crawlers fetch those resources, so avoid adding them back. - Look for
Disallow: /underUser-agent: *. That blocks the whole site and belongs only on a staging copy.
What to do next
- Upload the file to
/robots.txtat the domain root, then open it in a browser to confirm it loads as plain text. - Test a few important URLs with the robots.txt report and URL Inspection tool in Google Search Console.
- Build the sitemap you referenced with the XML sitemap generator, and use noindex, not Disallow, for pages you want out of search.
Frequently Asked Questions
Not reliably. Robots.txt only blocks crawling. If other sites link to a disallowed URL, Google can still index and display it — usually as a bare link with no snippet, because Google was never allowed to read the page. To reliably keep a page out of search results, leave it crawlable and add a noindex meta tag instead.
It depends on your goals. Blocking them asks those operators to keep your content out of AI model training data (Google-Extended covers Gemini training and grounding, and Google says it does not affect Search inclusion). Compliance is voluntary, and blocking can also mean AI assistants reference your content less, which can cost visibility. There's no universally correct answer — this generator lets you choose each crawler individually.
It must sit at your domain's root, for example https://www.example.com/robots.txt. It will not be recognized in a subfolder like /blog/robots.txt, and each subdomain needs its own copy if it has different crawl rules.
It asks a crawler to wait a set number of seconds between requests to reduce server load. Google does not support this directive, so it has no effect on Googlebot. Some other crawlers read it, but support varies by bot, and a high value can slow how quickly those crawlers discover new pages.
No. Robots.txt is a public file anyone can view. Listing a sensitive path there publishes its exact location to anyone who looks, including bots that ignore the rules entirely. Use authentication or server-level access controls for anything that actually needs to stay private.
Technically no — if none exists, crawlers assume everything is allowed. But having one is still good practice: it lets you point crawlers to your sitemap, block low-value crawl paths like internal search or filtered URLs, and make a deliberate choice about AI crawlers, rather than leaving all of that to default behavior.