Robots.txt Generator

Build or paste a robots.txt, read each rule in plain English, catch mistakes, and test whether Googlebot or an AI crawler may fetch an address.

Runs in your browser. Nothing is uploaded.

Updated

robots.txtRuns in your browser · Google’s rules

What it says

  • All crawlers
    • Disallow: /admin/ blocks addresses starting with /admin/
    • Disallow: /login blocks addresses starting with /login
    • Disallow: /cart blocks addresses starting with /cart
    • Disallow: /search blocks addresses starting with /search
    • Disallow: /*?sessionid= blocks addresses matching /*?sessionid= (* is any text)

Sitemaps: https://example.com/sitemap.xml

Test an address

Blocked Googlebot may not fetch /admin/settings. Line 2 decides it: it is the longest rule that matches in the group for all crawlers.

  1. User-agent: *
  2. Disallow: /admin/
  3. Disallow: /login
  4. Disallow: /cart
  5. Disallow: /search
  6. Disallow: /*?sessionid=
  7. Sitemap: https://example.com/sitemap.xml

Put the file at the root of the site: https://your-domain/robots.txt. It controls crawling, not indexing: a blocked page can still appear in results if other sites link to it. Use a noindex tag to keep a page out.

Your text stays on this device. No upload required.

How to use Robots.txt Generator

  1. Start from a preset, add rules, or paste an existing robots.txt.
  2. Read what each group does and fix any warnings.
  3. Test addresses, then copy or download the file.

Robots.txt Generator at a glance

Typical use: Check that blocking /shop/ still lets Google reach /shop/sale/ before you upload the file.

Runs in your browser; nothing is sent to our server. The tester follows Google’s open-source robots.txt parser.

When to use Robots.txt Generator

Write a robots.txt for a site, or paste an existing one, and find out what it really does. The page lists each group of crawlers with its rules in plain English, flags mistakes, and tests any address for any crawler, marking the line that decides it.

The tester follows Google’s own robots.txt parser (published as open source), down to its quirks, and was checked against it. Other search engines follow the same standard (RFC 9309) with small differences.

How the rules are read

  • A crawler uses the group that names it (User-agent: Googlebot), and only if none does, the group for *. Groups that name the same crawler are combined.
  • Rules match the start of the address path, and are case-sensitive. * matches any text and $ at the end means “the address ends here”: Disallow: /*.pdf$ blocks every PDF.
  • When several rules match, the longest one wins; if an Allow and a Disallow are equally long, Allow wins. So Disallow: /shop/ with Allow: /shop/sale/ lets crawlers into the sale pages only.
  • An empty Disallow: allows everything; Disallow: / blocks everything.

Robots.txt Generator examples

RuleEffect
Disallow: /admin/Blocks /admin/ and everything under it
Disallow: /*?Blocks every address with a query string
Allow: /$Allows only the home page (with Disallow: /)
Disallow: /*.pdf$Blocks addresses ending in .pdf
User-agent: GPTBot + Disallow: /Asks OpenAI’s training crawler to stay away

AI crawlers

“Block AI training, allow search” names the crawlers that collect text for training (GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, meta-externalagent, CCBot, MistralAI-Training, Amazonbot) and leaves search engines alone. The stricter preset also names AI search and assistant crawlers. Names change, and some fetchers that act for a person don’t follow robots.txt at all, so check the companies’ own pages for the latest.

Prefer the terminal?

See a site’s robots.txt from a terminal:

curl -s https://example.com/robots.txt

Crawlers fetch it from the root of each host, so www.example.com and shop.example.com each need their own.

References

Frequently asked questions

Does Disallow keep a page out of Google?

Not always. robots.txt controls crawling, not indexing: Google can still list a blocked address, without a description, if other pages link to it. To keep a page out, let Google crawl it and add a noindex meta tag or X-Robots-Tag header.

Why is my Crawl-delay or Noindex line ignored?

Google ignores Crawl-delay (Bing and Yandex use it) and stopped supporting Noindex in robots.txt in 2019. The page notes every line Google doesn’t use.

Is robots.txt a security measure?

No. It is a public request that well-behaved crawlers follow. Anyone can read it, and it can point people to the paths you list. Protect private areas with a login.

How big can robots.txt be?

Google reads the first 500 KiB and ignores the rest. A few dozen lines is usually enough; use * patterns instead of listing many addresses.

Is what I enter sent to your server?

No. The checks and the tester run in your browser, and the download is made there too.