ES
↑↓ navigate Enter open Esc close
SEO & Crawl Control

robots.txt Generator

Create a standard RFC 9309 robots.txt file with custom crawl rules, XML sitemap reference, CMS presets and crawler-specific directives.

The robots.txt file is generated locally in your browser. No rule configurations or inputs are uploaded to our servers.
Technical Standard Reviewed · Last review: August 29, 2026
General Crawl Configuration
Be careful when blocking CSS and JavaScript

Google uses CSS and JavaScript resources to render and understand many pages correctly. Avoid blocking resources with robots.txt when they are needed to display indexable content. Broad rules such as Disallow: /assets/, /css/ or /js/ can prevent Googlebot from accessing required resources and affect how Google interprets or ranks the page.

Only block resources you genuinely want crawlers to avoid, and verify the result with Google Search Console inspection tools.

Note: Ignored by Google and Yandex (main indexing bot). Supported by Bingbot, AhrefsBot, SemrushBot.
robots.txt Output Preview
0 bytes UTF-8 text/plain

Complete Technical Guide to robots.txt & RFC 9309 Specification

The robots.txt file is a standardized plain-text document served from the root of a domain (e.g., https://example.com/robots.txt). It communicates instructions to automated web search crawlers, spiders, and indexing bots regarding which sections of a website they are allowed or disallowed to access. In 2022, the Internet Engineering Task Force (IETF) codified the protocol as RFC 9309 (Robots Exclusion Protocol), formally unifying parsing rules, pattern matching syntax, and directive precedence across all major search engines.

Although robots.txt is widely supported by compliant search engines like Google, Bing, and Yandex, it operates as a voluntary advisory standard. Having a robots.txt file is not strictly mandatory for a website to be indexed, but maintaining an accurate file is essential for controlling crawl budget, preventing search bots from overloading backend infrastructure, and steering crawlers toward authoritative canonical URLs.

1. Core Directives: User-agent, Disallow, Allow & Sitemap

A standard robots.txt consists of one or more directive blocks structured by specific crawler targets:

  • User-agent: Defines the target crawler for the rules that follow. Using User-agent: * establishes universal rules for all compliant crawlers. Target-specific rules can be set for dedicated engines, such as User-agent: Googlebot or User-agent: Bingbot.
  • Disallow: Directs the bot not to crawl URLs matching the specified relative path prefix (e.g., Disallow: /admin/). Leaving the field empty (Disallow:) explicitly permits crawling of all pages.
  • Allow: Explicitly permits crawling of a specific sub-path located inside a broader disallowed folder (e.g., Disallow: /wp-admin/ followed by Allow: /wp-admin/admin-ajax.php).
  • Sitemap: Declares the absolute URL of your XML sitemap (e.g., Sitemap: https://example.com/sitemap.xml). You can specify multiple sitemaps to help search engines discover newly published pages. You can generate optimized sitemaps using our XML Sitemap Generator.

2. Crawling vs. Indexing: Why robots.txt is Not a noindex Mechanism

A frequent misconception in Technical SEO is treating Disallow as a de-indexing tool. Disallowing a URL only prevents search engines from crawling and downloading its contents. If the disallowed URL is linked internally or externally from other websites, Googlebot may still index the URL without fetching its HTML, displaying the URL in search results with a generic snippet stating "No information is available for this page".

If your goal is to completely remove a page from search results, you must allow Googlebot to crawl the page and output a <meta name="robots" content="noindex, follow"> tag or an X-Robots-Tag: noindex HTTP response header. You can configure and validate these tags with our Meta Tags Generator. Note that Google officially deprecated the proprietary Noindex: directive inside robots.txt in September 2019.

3. Directive Precedence & Pattern Matching (RFC 9309 §2.2.2)

Under the official RFC 9309 standard, search engines evaluate path rules using specific length matching:

  • Longest Matching Path Wins: The crawler compares all applicable rules and enforces the one with the longest character count.
  • Allow Precedence on Tie: When an Allow rule and a Disallow rule match the exact same character length on a URL, the Allow directive wins.
  • Wildcard (*): Matches zero or more arbitrary characters (e.g., Disallow: /*.pdf$).
  • End-of-path Anchor ($): Signifies the strict end of a URL path, distinguishing /file.pdf from query parameter variations like /file.pdf?download=1.
  • Case Sensitivity: Directives are case-sensitive. Disallow: /Admin/ will not block access to /admin/.

4. Technical Reality of Crawl-delay in Google, Yandex and Bing

The Crawl-delay directive is not part of the RFC 9309 core standard and is treated differently across search engines:

  • Googlebot: Completely ignores Crawl-delay inside robots.txt. Google dynamically adapts its crawl rate based on server responsiveness or custom settings in Google Search Console.
  • Yandex: Has officially ignored Crawl-delay for main search indexing since February 2018. Crawl speed for Yandex is configured inside Yandex Webmaster.
  • Bingbot, AhrefsBot & SemrushBot: Fully recognize and honor Crawl-delay (specified in seconds) to limit the frequency of requests to your server.

5. Specific Bots & Artificial Intelligence Crawlers

Modern websites often manage search engine crawlers alongside commercial SEO bots and AI data scrapers:

  • Search Engines: Googlebot, Bingbot, YandexBot, Baiduspider.
  • AI & LLM Crawlers: GPTBot (OpenAI), CCBot (Common Crawl), ClaudeBot (Anthropic), Google-Extended (Gemini training).
  • SEO Tool Crawlers: AhrefsBot, SemrushBot, DotBot.

You can audit bot accessibility and identify bot request behavior on your domain using our AI Bots & Crawler Checker.

6. Security Warning: robots.txt Does NOT Protect Confidential Content

Critical Security Notice

robots.txt is a public document accessible to anyone on the internet. Never list secret folders, staging URLs, private API endpoints, or sensitive administrative URLs in robots.txt, as malicious actors systematically inspect robots.txt to discover hidden paths.

To protect private resources, always enforce server-side authentication (OAuth, password logins, session cookies, or firewall IP whitelists).

7. How to Test and Verify Your robots.txt File

Before deploying changes to production, verify your configuration with the following steps:

  1. Direct HTTP 200 Check: Open https://yourdomain.com/robots.txt in your browser and confirm it loads as plain UTF-8 text.
  2. Google Search Console: Use the robots.txt report and URL Inspection tool to confirm Googlebot has retrieved the latest version.
  3. Technical SEO Health: Audit your site for crawl issues, broken links, and structured data integrity using our Broken Link Checker and Schema JSON-LD Validator.

Practical Example

WordPress Optimized Preset
Input: Allow all crawling, block /wp-admin/, allow admin-ajax.php, add sitemap
Output / Result: User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php Sitemap: https://example.com/sitemap.xml

Blocks the administrative backend while ensuring Googlebot can render dynamic AJAX content required for page layout.

E-Commerce / PrestaShop Preset
Input: Block internal classes, sensitive checkout, search filters and cart
Output / Result: User-agent: * Disallow: /classes/ Disallow: /config/ Disallow: /cart Disallow: /search Sitemap: https://example.com/sitemap.xml

Prevents crawler index bloat from duplicate faceted search results and cart URLs while keeping product catalog URLs crawlable.

Blocking Specific File Formats with Regex Wildcard ($)
Input: Block PDF documents from crawling across all folders
Output / Result: User-agent: * Disallow: /*.pdf$

The end-of-path anchor ($) ensures all URLs ending strictly in .pdf are blocked from crawling.

How to Generate and Deploy robots.txt in 4 Steps

1

Set General Access & User-agent

Choose whether to permit general search engine crawling (Disallow:) or restrict specific search bots.

2

Add Custom Directives & CMS Presets

Select conservative presets for WordPress, PrestaShop or Joomla, and add custom Allow/Disallow path rules.

3

Reference XML Sitemaps & Rate Limits

Enter your absolute sitemap.xml URL and optionally configure Crawl-delay for Bingbot and SEO crawlers.

4

Download & Upload to Server Root

Copy or download the generated `robots.txt` and upload it directly to the public web root of your hosting server.

Frequently Asked Questions about robots.txt

What is a robots.txt file and where should it be located?

A robots.txt file is a standardized plain-text document governed by RFC 9309 (Robots Exclusion Protocol). It must always be hosted at the top-level root directory of your domain (e.g., https://yourdomain.com/robots.txt). Files located in subdirectories (such as /blog/robots.txt) are not recognized as valid domain directives by web crawlers.

What is the purpose of robots.txt for website SEO?

Its primary purpose is to manage crawler access, conserve crawl budget on large sites, and prevent automated bots from indexing duplicate faceted filters, internal search queries, or private administrative scripts. It is not an access control or authentication system.

Where must the robots.txt file be uploaded on a web server?

It must be uploaded directly to the root public folder (public_html, www, or web root) of your domain or subdomain so that it responds directly with an HTTP 200 status code at https://yourdomain.com/robots.txt with Content-Type: text/plain.

Does Disallow in robots.txt prevent a page from appearing in Google?

Not necessarily. A Disallow directive prevents search engines from crawling the page content, but Google may still index the URL without a snippet if other external or internal pages link to it. To guarantee that a URL does not appear in search results, the crawler must be allowed to fetch the page so it can read a `` tag or an X-Robots-Tag: noindex HTTP header.

What is the difference between Disallow and noindex?

Disallow controls crawling (whether a bot can download the resource), whereas noindex controls indexing (whether a page can appear in search engine results). For a noindex directive to take effect, the URL must NOT be blocked by Disallow, because Googlebot must crawl the HTML code to discover the noindex directive.

What does User-agent mean in a robots.txt file?

The User-agent line specifies which crawler or automated robot the following block of rules applies to. `User-agent: *` sets general rules for all compliant bots, while specific identifiers like `User-agent: Googlebot`, `User-agent: Bingbot`, or `User-agent: GPTBot` define targeted rules for individual search or AI crawlers.

Can I include my XML sitemap inside robots.txt?

Yes. Search engines officially support one or multiple `Sitemap: https://yourdomain.com/sitemap.xml` directives anywhere in the robots.txt file. This helps search engine spiders discover all indexable website URLs immediately upon reading the file.

What happens if I accidentally block an important folder in robots.txt?

If you inadvertently block folders containing indexable content or essential rendering resources (such as CSS, JavaScript, or images), search engines will be unable to render pages correctly and may drop your pages from search results. You can resolve this immediately by updating your robots.txt on the server and inspecting the affected URLs in Google Search Console to request a recrawl.

Share this tool

Help others by sharing this free tool.