Robots.txt Generator
Create and test a robots.txt file
Build a robots.txt with rules per crawler, test whether a URL is allowed, and block AI crawlers if you want.
- robots.txt
- SEO
- Crawlers
How to use Robots.txt Generator
- Pick a Preset to start from (Allow all, Disallow all, Block AI crawlers or WordPress), or edit the default group.
- In each group, list the User-agents one per line (
*means all crawlers), add Allow or Disallow rules with + Add rule, and optionally set a Crawl-delay. Use + Add group for crawlers that need different rules. - Add your sitemap URLs under Sitemaps, one absolute URL per line.
- Under Test a URL, enter a User-agent and a URL or path to see whether it is allowed and which rule decided. Switch to Paste a robots.txt to test and lint an existing file instead.
- Copy the result or click Download robots.txt, then upload it to the root of your site (
/robots.txt).
How it works
The generator writes one block per group: its User-agent lines, then its Allow and Disallow rules, then Crawl-delay if set, followed by your Sitemap lines. A group without rules gets an empty Disallow:, which allows everything.
The tester parses the file and matches as described in RFC 9309. The group for the most specific matching user-agent product token applies (for example Googlebot-News falls back to a Googlebot group), and groups with the same user agent are merged; if none matches, the * group is used. Within the group, the longest matching path wins and Allow wins a tie. * matches any sequence of characters and a trailing $ anchors the end of the path. Paths are compared after normalising percent-encoding, and /robots.txt itself is always allowed.
When you paste a file, a linter reports missing colons, rules before any User-agent, paths that don’t start with / or *, invalid Sitemap URLs and Crawl-delay values, unknown or non-standard directives such as Host and Noindex, and files over 500 KiB.
Limits
- The tester answers what RFC 9309 rules say. Individual crawlers can differ: Google ignores
Crawl-delay(Bing and Yandex honour it), and non-standard directives likeHostorClean-paramare not evaluated. - Google reads only the first 500 KiB of a robots.txt; the linter warns about larger files but tests the whole file.
- The Block AI crawlers preset lists 28 known AI user agents. New crawlers appear regularly, and a crawler can ignore robots.txt or use an undeclared user agent.
- Only the path and query of a tested URL are used; the host is not checked against the site the file belongs to.
- The generated file is not linted. Values such as a non-numeric Crawl-delay are written as typed; the linter runs on pasted files.
Privacy
Generating, testing and linting run entirely in your browser. Nothing you type or paste is uploaded or stored, and the site’s Content Security Policy blocks requests to other servers. If you use Send to… to open the file in another tool, it is handed over through this tab’s session storage and removed as soon as that tool reads it.
Frequently asked questions
Does Disallow keep a page out of search results?
No. It asks crawlers not to fetch the page, but a blocked URL can still be indexed if other sites link to it. To keep a page out of results, allow crawling and use a noindex meta robots tag or X-Robots-Tag header instead. Noindex in robots.txt is not supported by Google.
Which rule wins when Allow and Disallow both match?
The rule with the longest matching path. If both are the same length, Allow wins. For example, Allow: /wp-admin/admin-ajax.php beats Disallow: /wp-admin/ for that one file.
Why does my crawler use the * group even though I listed it?
A crawler follows only the most specific group that names it and ignores * entirely. If it matches nothing, it uses *. Check the spelling of the product token: matching is case-insensitive but must be the crawler’s token (letters, _ and -), not its full user-agent string.
Does blocking AI crawlers stop my content being used for AI?
Only for crawlers that respect robots.txt and identify themselves. Tokens like Google-Extended and Applebot-Extended control AI training use without affecting normal search crawling. Content already collected, or fetched by crawlers that ignore the file, is not affected.
Is robots.txt a security measure?
No. It is a public request that well-behaved crawlers honour; anyone can read it and ignore it. Protect private pages with authentication, and avoid listing secret paths, since the file itself reveals them.
More tools
- Clean Image: Inspect and remove hidden image metadata
- JWT Decoder: Decode and verify JSON Web Tokens
- Diff Checker: Compare two texts line by line
- JS Runner: Run JavaScript and TypeScript in your browser
- JSON Formatter: Format, validate and minify JSON
- Encode / Decode: Base64, URL, HTML entity and hex
- Hash Generator: MD5, SHA and HMAC of any text
- UUID Generator: Generate UUID v4 and v7 in bulk
- Timestamp Converter: Unix time ↔ human dates
- Regex Tester: Test regular expressions live
- URL Parser: Break a URL into its parts
- HTTP Status Codes: Look up any HTTP status code
- MIME Type Lookup: File extension ↔ MIME type
- Password Generator: Strong random passwords and passphrases
- Random String Generator: Random tokens, IDs and keys
- Slug Generator: Turn titles into URL slugs
- Case Converter: camelCase, snake_case, Title Case and more
- Word Counter: Count words, characters and reading time
- JSON to TypeScript: Generate TypeScript types from JSON
- JSON Diff: Compare two JSON documents structurally
- JSON to SQL: Turn JSON arrays into SQL inserts
- YAML ↔ JSON: Convert between YAML and JSON
- XML ↔ JSON: Convert between XML and JSON
- CSV ↔ JSON: Convert between CSV and JSON
- CSV Viewer: View, sort and filter CSV files
- SQL Formatter: Format and beautify SQL queries
- cURL ↔ Fetch: Convert cURL commands to fetch and back
- Markdown Editor: Write Markdown with a live preview
- Text Cleaner: Remove duplicate lines, empty lines and extra spaces
- Find & Replace: Find and replace in any text
- Cron Expression Builder: Build and explain cron schedules
- User-Agent Parser: Identify browser, OS and device from a user agent
- HTTP Headers Inspector: Paste response headers and get them explained
- JWT Generator: Create and sign test JSON Web Tokens
- Certificate Inspector: Decode PEM certificates and keys
- Meta Tag Inspector: Check a page's SEO and social tags
- UTM Builder: Build campaign URLs with UTM parameters
- URL Cleaner: Strip tracking parameters from links
- Sitemap Generator: Create an XML sitemap from a list of URLs
- Image Compressor: Shrink JPEG, WebP and AVIF images in your browser
- Image Resizer: Resize images by pixels, percentage or to fit a box
- Image Converter: Convert between PNG, JPEG, WebP and AVIF
- Image to Base64: Encode images as Base64 data URIs and decode them back
- SVG Optimizer: Minify and sanitize SVG files
- Favicon Generator: Make favicon.ico, Apple and Android icons from an image or emoji
- Color Converter: HEX, RGB, HSL, OKLCH and contrast checks
- Number Base Converter: Binary, octal, decimal, hex and float bits
- IP / CIDR Calculator: Subnets, masks and IP ranges for IPv4 and IPv6
- JSONPath Query: Query JSON with JSONPath expressions
- JSON Schema Validator: Validate JSON against a schema, or generate one
- Semver Checker: Check versions against semver ranges
- chmod Calculator: Unix permissions: rwx ↔ octal
- .env Diff: Compare and validate .env files
- TOTP Generator: Generate and verify 2FA codes
- String Escaper: Escape and unescape strings for any language
- Unicode Inspector: See every character, code point and hidden symbol
- Mock Data Generator: Generate realistic fake data
- QR Code Generator: Create QR codes for links, Wi-Fi and contacts
- Lorem Ipsum Generator: Placeholder text in paragraphs, sentences or words
- Date Calculator: Date differences, business days and durations
- Unit Converter: Convert bytes, lengths, weights, temperatures and more
- Query CSV with SQL: Run SQL queries on CSV files
- PDF Merge & Split: Merge, split, reorder and rotate PDFs
- PDF Metadata Cleaner: See and remove hidden PDF metadata
- Office Metadata Cleaner: Remove author and revision data from Word, Excel and PowerPoint
- Images to PDF: Combine images into one PDF
- Image Editor: Crop, rotate, resize and adjust images
- Encrypt / Decrypt Text: Encrypt text with a passphrase (AES-GCM)
- SSH Key Generator: Generate Ed25519 and RSA SSH keys locally
- Email Header Analyzer: Trace an email's path and check SPF, DKIM and DMARC
- JSON to Code: Generate Go, Python, Rust, Java, C# and Kotlin models from JSON
- docker run ↔ Compose: Convert docker run commands to docker-compose and back
- Color Palette Extractor: Pull the dominant colours out of any image
- Password Strength Checker: How long would your password take to crack?
- SPF / DKIM / DMARC Checker: Validate and explain email DNS records
- Kubernetes YAML Checker: Validate and explain Kubernetes manifests
- .gitignore Generator: Build a .gitignore from presets
- CSP Builder: Build and check a Content-Security-Policy
- JSON-LD Generator: Create schema.org structured data
- Open Graph Image Generator: Make 1200×630 social preview images
- CSS Generator: Gradients, shadows, clamp() and more
- Time Zone Meeting Planner: Find meeting times across time zones