⚡ Free Online Webmaster Utility

🤖 Robots.txt Generator

Generate standards-compliant RFC 9309 robots.txt files online. Configure search engine bot rules, block AI scrapers, test URL indexability, and link your XML sitemap.

🔥 14,800 monthly active users 🔒 100% Client-Side • Zero Server Upload

Complete Guide to Robots.txt & The RFC 9309 Exclusion Protocol

A robots.txt file is a plain-text document located at the root of your web server that instructs automated web robots—such as Googlebot, Bingbot, and AI data scrapers—on which parts of your website they are permitted or restricted from crawling. First conceptualized in 1994 and formally standardized as IETF RFC 9309 in 2022, the Robots Exclusion Protocol is one of the most fundamental building blocks of modern technical Search Engine Optimization (SEO) and web server security.

⚡ Quick Usage Guide

1. Choose a 1-click platform preset (WordPress, Shopify, Laravel, or Block AI) or select custom crawler rules.
2. Specify disallowed directories (e.g. /admin/, /checkout/) and explicitly allowed public assets.
3. Verify your XML Sitemap absolute URL and audit individual paths with the Live Indexability Tester.
4. 1-click copy or download your validated robots.txt file and place it in your website root directory.

Core Robots.txt Directives Explained

A well-formed robots.txt file is organized into blocks of directives. Each block begins with a User-agent declaration specifying which crawler the following rules apply to:

Rule Precedence: How Allow and Disallow Interact (RFC 9309)

Under the standardized RFC 9309 specification, crawler directives are evaluated by path specificity rather than the visual line order in the file:

  1. Longest Match Wins: The rule whose path pattern contains the greatest number of characters matching the requested URL is the rule that determines access. For instance, given Disallow: /catalog/ (9 chars) and Allow: /catalog/featured.html (23 chars), a crawler requesting /catalog/featured.html will be permitted.
  2. Allow Wins on Equal Length: If an Allow directive and a Disallow directive match the exact same number of characters, the Allow directive wins.
  3. Wildcards (*) and End-Anchors ($): The asterisk represents zero or more arbitrary characters, while the dollar sign anchors the pattern to the exact end of the URL path (e.g., Disallow: /*.pdf$ blocks all PDF files).

How to Block AI Scrapers and Protect Your Content

As generative artificial intelligence models proliferate, many website owners, publishers, and software platforms wish to allow search engine bots (like Googlebot and Bingbot) to index their pages for organic traffic, while simultaneously preventing AI companies from scraping their copyrighted content to train large language models. You can accomplish this by adding targeted disallow blocks for known AI bot user-agents:

Our tool features a 1-click "🛡️ Block AI Scrapers" preset that injects verified disallow blocks for all prominent AI bots without touching your organic search crawlability.

Step-by-Step Server Configuration Guide

Your generated robots.txt file must always be publicly accessible at https://yourdomain.com/robots.txt with an HTTP 200 OK status and a Content-Type: text/plain header:

1. Apache Web Server

Place the robots.txt file directly in your public_html or www root folder. Ensure your .htaccess file does not rewrite or redirect requests to /robots.txt.

2. Nginx Web Server

Save robots.txt inside your site's root directory (e.g., /var/www/html/) and add the following block inside your Nginx server configuration:

location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
}

3. Next.js 14+ App Router

In modern Next.js projects using the App Router, you can export a dynamic or static robots file by creating app/robots.ts or placing a static robots.txt directly inside the public/ directory.

Frequently Asked Questions (FAQ)

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

The robots.txt file MUST be placed directly in the top-level root directory of your website domain or subdomain (e.g., https://example.com/robots.txt). Search engine crawlers look exclusively at the root URL. Placing robots.txt in a subdirectory like https://example.com/sub/robots.txt is invalid and will be completely ignored by Googlebot and all other standard crawlers.

Does Googlebot respect the Crawl-delay directive in robots.txt?

No. According to official Google Search Central documentation, Googlebot completely ignores the Crawl-delay directive. If your server is experiencing high crawl traffic from Google, you can adjust Google's crawl rate via Google Search Console settings. Other search engines like Bingbot, Yandex, and Baiduspider still recognize and respect Crawl-delay.

How do I block AI web scrapers like GPTBot, CCBot, and ClaudeBot?

To block AI scrapers from harvesting your website content for LLM training while still allowing Google and Bing to index your pages for organic search, declare individual User-agent blocks with 'Disallow: /'. For example: 'User-agent: GPTBot' followed by 'Disallow: /', and repeat for ClaudeBot, CCBot, and PerplexityBot. Our 1-click 'Block AI Scrapers' preset inserts these rules automatically.

What is the difference between Disallow: / and Disallow: in robots.txt?

'Disallow: /' (with a forward slash) instructs crawlers not to index ANY page or directory on the entire website, de-indexing your whole site. In contrast, 'Disallow:' (empty, with no slash) explicitly instructs crawlers that no directories are restricted, granting full access to crawl the entire website.

How do Allow and Disallow directives interact according to the RFC 9309 standard?

Under the official IETF RFC 9309 Robots Exclusion Protocol, directives are evaluated by specificity. The rule with the longest matching character length takes precedence. For example, if you declare 'Disallow: /admin/' and 'Allow: /admin/public-preview/', a crawler visiting '/admin/public-preview/' will follow the Allow rule because it is longer and more specific. If an Allow and Disallow rule have identical lengths, the Allow rule takes precedence.