Robots.txt Generator

Build a valid robots.txt that tells search engines which parts of your site to crawl.

How it works

Robots.txt is the first file well-behaved crawlers fetch from your domain — Googlebot reads it before crawling a single page. Each block starts with a User-agent line naming which crawler the rules apply to (* means everyone), followed by Allow and Disallow lines that are matched as path prefixes, so Disallow: /admin blocks /admin, /admin/users, and everything beneath it. Crawl-delay asks polite crawlers to pause between requests, and the Sitemap line points them at your XML sitemap for discovery. Two caveats: robots.txt is a request, not access control — malicious bots ignore it, so never use it to hide secrets — and the file must live at your domain root (e.g. example.com/robots.txt) to be found.

How to use

The generated file updates live as you change any field:

  1. Enter a User-agent — * means the rules apply to all crawlers, or type a specific bot such as Googlebot for bot-specific rules.
  2. Click Add rule, then choose Allow or Disallow from the dropdown and type a path such as /admin or /private. Rules match as path prefixes, so Disallow: /admin blocks /admin, /admin/users, and everything beneath it. Remove a row with its Remove button.
  3. Optionally set a Crawl-delay in seconds to ask polite crawlers to pause between requests, and paste your Sitemap URL (for example https://example.com/sitemap.xml) so crawlers can discover it automatically.
  4. Click Copy file, then save the result as a file named robots.txt at your domain's root (example.com/robots.txt) — that is the only location crawlers check.

Frequently asked questions

What does a finished robots.txt look like?

A simple one has one rule per line: first "User-agent: *" to address all crawlers, then "Disallow: /admin" to keep the admin area out of search results, then "Allow: /" for everything else, and finally "Sitemap: https://example.com/sitemap.xml". The generator builds exactly this format for you.

How do Allow and Disallow interact?

Each rule is matched against the start of the requested URL path. When an Allow and a Disallow both match, most major crawlers follow the longer (more specific) rule — for example, "Disallow: /blog" plus "Allow: /blog/public" blocks /blog/drafts while letting /blog/public through.

Does robots.txt hide pages from everyone?

No — it is a polite request, not access control. Reputable crawlers honor it, but malicious bots, scrapers, and anyone who guesses the URL will ignore it. Never use robots.txt to hide secrets, credentials, or truly private content; use real authentication instead.

Does Crawl-delay work with Google?

Google does not honor Crawl-delay; control Googlebot's crawl rate in Google Search Console instead. Some other crawlers, including Bing's, do respect it, so the setting is still useful for mixed crawler traffic.