What robots.txt Actually Does
robots.txt is a plain-text file served at the root of your domain (https://example.com/robots.txt) that tells well-behaved crawlers which paths they should or should not request. It is a convention, not a security mechanism — a malicious scraper will simply ignore it. Google and Bing both honour it.
Syntax Rules
- Each rule is
Field: value. Field names are case-insensitive but the value is not. User-agentstarts a new group; rules below apply to that crawler until the nextUser-agent.Disallow: /pathblocks a path.Allow: /pathoverrides a broaderDisallow.Sitemap:is a non-group directive — it can appear anywhere and applies site-wide.Crawl-delay:is honoured by Bing and Yandex; Google ignores it.- Comments start with
#.
What robots.txt Cannot Do
- It cannot hide content — a Disallowed page can still be indexed if linked elsewhere, just without a snippet.
- It does not remove a page from the index. Use
noindexfor removal. - It cannot protect sensitive files. Use authentication.
Common Mistakes
The worst mistake in SEO history is a live Disallow: / on a production site — it will deindex an entire domain within weeks. This tool never emits that pattern unless you explicitly add it, and it validates that your "Allow all" section is not accidentally overridden.
A second common error is blocking /wp-content/ on WordPress or /_next/static/ on Next.js — these contain CSS and JS that Google needs to render the page. Blocking them will hurt your Core Web Vitals scoring because Google can't fetch the resources it needs.
The third is Disallowing a URL and simultaneously applying noindex via meta tag. The crawler can't see the noindex because it is not allowed to fetch the page. If you need removal, use noindex without a Disallow.
Recommended Baseline
For 95% of sites, the safest baseline is:
User-agent: * Allow: / Disallow: /admin/ Disallow: /cart Sitemap: https://example.com/sitemap.xml
This keeps everything crawlable except cart and admin paths (which waste crawl budget), and gives the crawler an explicit sitemap URL.