stakritools
Developer
  • Base64 Encoder/Decoder
  • Color Picker & Converter
  • CSS Minifier
  • CSV to JSON Converter
  • Hash Generator
  • HTML Minifier
  • JS Minifier
  • JSON Formatter & Validator
  • JSON to CSV Converter
  • JWT Decoder
  • Markdown Editor
  • Password Generator
  • Regex Tester
  • SQL Formatter
  • Unix Timestamp Converter
  • URL Encoder/Decoder
  • UUID Generator
  • XML Formatter
  • YAML Formatter
View all
Image
  • Favicon Generator
  • Image Compressor
  • Image Cropper
  • Image Flipper
  • Image Resizer
  • Image Rotator
  • Image to Base64
  • JPG to PNG Converter
  • PNG to JPG Converter
  • QR Code Generator
  • SVG to PNG Converter
  • Watermark Image
  • WebP Converter
View all
SEO
  • FAQ Schema Generator
  • Meta Description Generator
  • Open Graph Generator
  • Robots.txt Generator
  • SEO Site Auditor
  • SERP Preview
  • Slug Generator
  • Twitter Card Generator
View all
Text
  • Case Converter
  • Find and Replace
  • Lorem Ipsum Generator
  • Random Text Generator
  • Remove Duplicate Lines
  • Remove Extra Spaces
  • Text Diff Checker
  • Word Counter
View all
Calculator
  • Age Calculator
  • BMI Calculator
  • Compound Interest Calculator
  • Date Difference Calculator
  • Discount Calculator
  • EMI Calculator
  • GST Calculator
  • Income Tax Calculator
  • Loan Calculator
  • Percentage Calculator
  • SIP Calculator
  • Tip Calculator
  • Unit Converter
View all
Blog
stakritools

205+ free, browser-based tools for developers, marketers, and creators — no sign-up, no clutter.

Developer Tools

  • Base64 Encoder/Decoder
  • Color Picker & Converter
  • CSS Minifier
  • CSV to JSON Converter
  • Hash Generator
  • HTML Minifier
  • JS Minifier
  • JSON Formatter & Validator
  • JSON to CSV Converter
  • JWT Decoder
  • Markdown Editor
  • Password Generator
  • Regex Tester
  • SQL Formatter
  • Unix Timestamp Converter
  • URL Encoder/Decoder
  • UUID Generator
  • XML Formatter
  • YAML Formatter

Image Tools

  • Favicon Generator
  • Image Compressor
  • Image Cropper
  • Image Flipper
  • Image Resizer
  • Image Rotator
  • Image to Base64
  • JPG to PNG Converter
  • PNG to JPG Converter
  • QR Code Generator
  • SVG to PNG Converter
  • Watermark Image
  • WebP Converter

SEO Tools

  • FAQ Schema Generator
  • Meta Description Generator
  • Open Graph Generator
  • Robots.txt Generator
  • SEO Site Auditor
  • SERP Preview
  • Slug Generator
  • Twitter Card Generator

Text Tools

  • Case Converter
  • Find and Replace
  • Lorem Ipsum Generator
  • Random Text Generator
  • Remove Duplicate Lines
  • Remove Extra Spaces
  • Text Diff Checker
  • Word Counter

Calculator Tools

  • Age Calculator
  • BMI Calculator
  • Compound Interest Calculator
  • Date Difference Calculator
  • Discount Calculator
  • EMI Calculator
  • GST Calculator
  • Income Tax Calculator
  • Loan Calculator
  • Percentage Calculator
  • SIP Calculator
  • Tip Calculator
  • Unit Converter

Company

  • Blog
  • About
  • Privacy Policy
  • Contact
© 2026 stakritools. All rights reserved.
  1. Home
  2. SEO
  3. Robots.txt Generator
SEO

Robots.txt Generator

Build a valid robots.txt file with a visual rule builder — pick user-agents, add Allow/Disallow rules and crawl delays, attach your sitemap URL, and copy or download the finished file. Includes one-click presets for allowing everything, blocking everything, and blocking AI crawlers.

Try:
User-agent: *

How To Use

  1. 1.Start from a preset (Allow all, Block all, or Block AI bots) or build from scratch with the default empty group.
  2. 2.For each User-agent group, type the crawler name — use * to target every crawler, or pick a common one like Googlebot, Bingbot, or GPTBot from the quick-select buttons.
  3. 3.Add Allow or Disallow rules with the path you want to control, such as /private/ or /wp-admin/ — click + Add Rule to add more than one per group.
  4. 4.Optionally set a Crawl-delay in seconds for a group if you need to slow down an aggressive crawler (note that Googlebot ignores this directive).
  5. 5.Click + Add User-agent Group to add rules for another crawler, and use + Add Sitemap to list one or more sitemap URLs at the bottom of the file.
  6. 6.Review the live preview at the bottom, then Copy or Download the generated robots.txt and upload it to the root of your domain (e.g. https://example.com/robots.txt).

Examples

Allow all
Let every crawler access every page — the simplest valid robots.txt.
Block all
Block every crawler from the entire site — useful for staging environments.
Block AI bots
Allow normal search crawlers while opting out of common AI training crawlers.
Common CMS setup
Block admin and cart paths while allowing one public exception inside admin.

About Robots.txt Generator

The Robots Exclusion Protocol, in Plain Terms

robots.txt implements the Robots Exclusion Protocol, a decades-old, informally-standardized convention (later formalized as RFC 9309) that well-behaved crawlers check before requesting pages from your site. The file is organized into groups, each starting with one or more User-agent lines identifying which crawler the group applies to, followed by Allow and Disallow rules that permit or restrict specific paths for that crawler. It's a voluntary convention rather than an enforced security boundary — reputable crawlers from search engines and major AI companies respect it, but nothing technically stops a script or a bad actor from ignoring it entirely, so robots.txt should never be relied on to protect genuinely sensitive or private content.

Crawl Control vs. Search Result Control

It's a common misconception that Disallow in robots.txt is the tool for keeping a page out of Google's search results — it isn't, at least not reliably. Disallow only stops a crawler from requesting a URL; if that URL is discovered through a link elsewhere, Google can still list the bare URL in search results without ever reading its content, since it was never allowed to crawl it. The correct tool for excluding a specific page from search results is a noindex directive placed on the page itself (a meta tag or HTTP header), which paradoxically requires that page to remain crawlable so the noindex instruction can actually be seen and honored.

How Multiple User-agent Groups Interact

When a robots.txt file contains several groups, each crawler follows only the single most specific group that names it — a dedicated Googlebot group, if one exists, completely overrides the general * group for Googlebot specifically, rather than the two being combined or merged. Within whichever single group applies, most crawlers resolve conflicting Allow and Disallow rules by following the longest (most specific) matching path rather than simply the rule listed first or last, which is why a broad Disallow can be safely paired with a more specific Allow carving out an exception underneath it.

Presets for Common Situations

This tool includes ready-made presets for the handful of situations most sites eventually need: Allow all is the simplest valid file, granting universal access and typically used alongside a listed sitemap; Block all applies a blanket Disallow: / to every crawler, most often used to keep a staging, development, or password-protected preview environment out of search engines entirely; and Block AI bots keeps standard search crawling open while adding explicit Disallow rules for named AI training crawlers like GPTBot, CCBot, and Google-Extended, for site owners who want to opt content out of AI training specifically without affecting their regular search visibility.

Testing Your Robots.txt Before You Rely On It

After uploading a new robots.txt to your site's root, verify it's actually being served correctly by visiting the URL directly in a browser and confirming it returns the exact plain-text content you expect with a 200 status, not a redirect, an error page, or your site's default 404 page rendered with a 200 status (a subtle but common misconfiguration). Google Search Console's URL Inspection tool can also confirm whether Googlebot specifically sees a given URL as blocked or allowed under your current file, which is a more reliable check than assuming your rules parse the way you intended just from reading them yourself.

FAQs

robots.txt is a plain-text file that tells well-behaved web crawlers which parts of your site they're allowed or not allowed to request, following the Robots Exclusion Protocol. It must be placed at the root of your domain — https://example.com/robots.txt — since crawlers only check that exact location and won't look for it anywhere else, including subdirectories or other domains and subdomains you control (each subdomain needs its own robots.txt if you want to control it separately).

Not reliably on its own. Disallowing a URL in robots.txt stops well-behaved crawlers from requesting and reading that page's content, but if the URL is linked to from elsewhere, Google can still index the bare URL without visiting it, sometimes showing it in results with no description since it was never crawled. To reliably keep a specific page out of search results, use a noindex meta tag or HTTP header on the page itself (which requires the page to be crawlable so the directive can be seen) rather than relying on robots.txt alone, and reserve robots.txt for controlling crawl behavior and server load instead.

Disallow tells a crawler not to request URLs matching the given path, while Allow explicitly permits a path — Allow is mainly useful for carving out an exception inside a broader Disallow rule, such as disallowing an entire /wp-admin/ directory but allowing the one /wp-admin/admin-ajax.php file inside it that needs to remain crawlable for the site to function correctly. Within a single user-agent group, most crawlers apply the most specific matching rule (the longest matching path) rather than simply the first or last rule listed.

A User-agent line of * matches any crawler that doesn't have its own more specific, dedicated group elsewhere in the file — it's the catch-all default group almost every robots.txt file includes. If you also define a specific group for, say, Googlebot, that crawler follows only its own dedicated group's rules and ignores the * group entirely; crawlers don't combine rules from multiple matching groups.

Support is inconsistent across crawlers. Bingbot and several other crawlers respect the Crawl-delay directive (specified in seconds between requests), but Googlebot explicitly ignores it, instead determining its own crawl rate based on your server's response times and configuration available separately in Google Search Console. Because of that inconsistency, treat Crawl-delay as a hint that helps with some crawlers rather than a universal, guaranteed rate limit.

Some site owners choose to block AI training crawlers (GPTBot from OpenAI, CCBot from Common Crawl, Google-Extended for Gemini/Bard training data, and others) specifically to opt their content out of being used to train large language models, independent of whether the content is also indexed for regular search. This is a policy decision rather than a technical requirement — reputable AI companies that publish a named, documented crawler generally do respect a robots.txt Disallow rule targeting their specific user-agent string, which is why this tool includes a one-click 'Block AI bots' preset for site owners who want that option without hand-writing the rules.

Yes — a group with that crawler's User-agent and a single Disallow: / rule blocks it from every path on your site, since / matches everything (all paths start with a leading slash). This is exactly what the 'Block all' preset generates for the * wildcard, though blocking every crawler including search engines will also prevent your site from being indexed at all, so use a blanket Disallow: / thoughtfully — it's more commonly applied to a specific crawler you want to exclude, or to an entire staging/development environment that shouldn't be indexed in the first place.

Yes, it's a widely followed best practice — adding a Sitemap: line with the full, absolute URL to your XML sitemap gives crawlers an easy, well-known place to discover the complete list of URLs you want indexed, in addition to (not instead of) submitting your sitemap directly through tools like Google Search Console. You can list multiple Sitemap: lines if you maintain more than one sitemap file, and the directive can appear anywhere in the file, independent of any specific User-agent group.

Most crawlers treat a missing robots.txt (one that returns a 404 Not Found) as full permission to crawl everything on the site, since there's no explicit restriction in place. That's a perfectly valid, common setup for small sites with nothing to restrict — but if your server returns a 5xx server error instead of a proper 404 when robots.txt is requested, some crawlers (including Googlebot) may interpret that as a signal to pause crawling your site entirely until the error resolves, so it's worth confirming your robots.txt URL returns either a valid file or a clean 404, not an error.

No — the entire rule builder and the generated file preview run locally in your browser using plain JavaScript string building; nothing about your site's structure or the paths you're restricting is transmitted to any server. You'll still need to manually upload the resulting file to your own site's root directory for it to take effect, since this tool only generates the file's contents.

Related Tools

Robots.txt Generator controls crawler access at the site level. These related tools help with the indexing and metadata decisions that go alongside it.

SERP Preview
SEOPreview how a page you're allowing crawlers to access will look in search results.
Meta Description Generator
SEOWrite the on-page metadata for the pages you choose to keep crawlable.
Open Graph Generator
SEOControl how your crawlable, shareable pages look when posted on social media.
Slug Generator
SEOBuild clean URL paths that are easy to reference precisely in Allow/Disallow rules.