Robots.txt Generator

Generate a valid robots.txt file for your website.

audits run
9450
avg rank
+15
pass rate
96%
local-only
100%
READY ROBOTS-TXT-GENERATOR · WORKSPACE
▎ MARKET BRIEFING

The Crawl Budget Problem That robots.txt Actually Solves

Most guides explain robots.txt as a tool for "blocking pages from Google." That framing misses the real use case for established sites. The core problem robots.txt solves is crawl budget allocation.

Google's crawlers spend a finite amount of time and resources on each site — the crawl budget. For small sites (under a few thousand pages), crawl budget is rarely a concern. For large sites — e-commerce stores with faceted navigation, news sites with infinite scroll archives, SaaS platforms with parametric search URLs — crawl budget is a critical operational constraint. Googlebot visiting 100,000 faceted search result URLs (like /products?color=red&size=M&sort=price-asc) wastes crawl budget that could have been spent crawling actual product pages.

robots.txt is the primary mechanism for directing crawlers away from these low-value URL patterns and toward the pages you actually want indexed.

The Crawl-Block vs Index-Block Distinction: A Common and Costly Mistake

This is the most frequently misunderstood aspect of robots.txt, and getting it wrong can have serious SEO consequences. There are two completely separate operations:

  • Blocking crawling (robots.txt Disallow) — prevents Googlebot from fetching and reading the page
  • Blocking indexing (noindex meta tag or X-Robots-Tag header) — prevents Google from including the page in its index

The critical edge case: if a URL is disallowed in robots.txt but is linked to from many external sites, Google can still index that URL as a "URL-only" entry in the index — it knows the page exists and may rank it, but it has never read the content. This means Google might rank an empty snippet for your /admin/login page, your staging environment, or your internal search results.

Furthermore, if you use Disallow to block a page that you want to noindex, the noindex tag never gets delivered to Googlebot (because the crawler cannot access the page to read the tag). The result is paradoxical: blocking a page with robots.txt while trying to noindex it with a meta tag produces a page that Google cannot noindex, because it cannot see the noindex instruction. The correct approach for pages you want removed from the index: allow crawling, use noindex.

Syntax Reference for Common Use Cases

Block all crawlers from a directory:

User-agent: *
Disallow: /admin/

Block a specific crawler (e.g., AI training bots):

User-agent: GPTBot
Disallow: /

Block crawlers from parameterized URLs (faceted navigation):

User-agent: *
Disallow: /*?*sort=
Disallow: /*?*filter=
Disallow: /*?*page=

Point Googlebot to your sitemap (best practice for all sites):

Sitemap: https://yourdomain.com/sitemap.xml

What robots.txt Cannot Do

  • It cannot protect sensitive content — authenticated routes require server-side access controls
  • It cannot prevent all bots from accessing blocked pages — only bots that respect the REP standard (Googlebot, Bingbot, and most legitimate crawlers do; scrapers and malicious bots typically do not)
  • It cannot remove a URL from Google's index — use the noindex tag or the URL Removal Tool in Google Search Console for that

How to Use This Tool

  1. Select which crawlers you want to configure rules for.
  2. Add Disallow paths for directories and URL patterns you want to exclude.
  3. Enter your sitemap URL to include the Sitemap directive.
  4. Download the generated robots.txt and upload it to your site's root directory.

FAQ

01 Does Disallow in robots.txt prevent Google from indexing a page? +

No — and this distinction is critical. Disallow prevents crawling (Googlebot fetching the page's content), but Google can still index a URL it has never crawled if external sites link to it. To prevent indexing, you need a noindex meta tag or X-Robots-Tag response header on the page itself. Importantly, if you Disallow a page in robots.txt, Googlebot cannot read the noindex tag on that page — so blocking crawling while trying to noindex simultaneously does not work. Allow crawling, use noindex.

02 What paths should I always Disallow for a typical website? +

Common paths to block: /admin/ (CMS backend), /wp-admin/ (WordPress), /cart and /checkout (e-commerce, no SEO value), /search? (internal search results), /login, /register, /account (user-specific pages that should not be indexed), and any staging or development paths. Also block URL parameters that create duplicate content: sort, filter, and pagination parameters that generate thousands of near-identical pages.

03 Can I use robots.txt to block AI training bots? +

You can attempt to, and major AI companies have published their crawler user-agent names: GPTBot (OpenAI), Google-Extended (Google AI training), CCBot (Common Crawl, used by many AI datasets), anthropic-ai (Anthropic). Adding Disallow: / for these user-agents signals you do not consent to AI training use of your content. However, compliance is voluntary — there is no technical enforcement mechanism beyond the bots' own policies.

04 My robots.txt is blocking pages I want Google to crawl. How do I fix it? +

First, use Google Search Console's URL Inspection tool to confirm Googlebot is blocked. Then check your robots.txt for overly broad Disallow rules — a single Disallow: / blocks everything, and Disallow: /p blocks not just /private but also /products, /pages, and any other path starting with /p. Use the Google robots.txt Tester in Search Console to test specific URLs against your rules before deploying changes. After fixing the file, request re-crawling via URL Inspection.