Robots.txt Generator

Generate a valid robots.txt with sensible defaults, crawler-specific rules and your sitemap location, without blocking anything you need indexed.

4Disallow rules

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Robots.txt Generator does

This robots.txt generator will generate a valid robots.txt with sensible defaults, crawler-specific rules and your sitemap location, without blocking anything you need indexed. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for creating a robots.txt for a new site. The companion to this one is our XML sitemap generator.

How to use it

  1. List the paths you want crawlers to skip, one per line.
  2. Add your sitemap URL — it must be an absolute URL.
  3. Copy the output and save it as robots.txt at your domain root.
  4. Verify it loads at yourdomain.com/robots.txt before relying on it.

How it works

robots.txt controls crawling, not indexing, and that distinction causes a lot of confusion. A page blocked in robots.txt can still appear in search results if other sites link to it — Google simply shows it without a description, because it was not allowed to fetch the content. To keep a page out of the index, allow crawling and use a noindex meta tag instead.

The classic mistake is blocking CSS and JavaScript directories. Search engines render pages to assess them, and a page whose stylesheet is blocked renders as unstyled text, which looks broken to the crawler. Never disallow asset directories.

The file must sit at the domain root and is case-sensitive in its paths. Subdomains need their own file. The AI crawler rules are voluntary — well-behaved crawlers honour them, and nothing in the protocol compels anyone to.

When to use it

  • Creating a robots.txt for a new site.
  • Blocking crawler access to admin, cart and checkout paths.
  • Declaring your sitemap location to search engines.

Common mistakes to avoid

  • Using Disallow: / on a live site, which blocks the entire domain from crawling.
  • Blocking CSS or JS directories, which prevents proper rendering.
  • Expecting robots.txt to remove a page from search results — that needs noindex.

Frequently asked questions

Does robots.txt stop a page being indexed?

No. It stops crawling. A blocked URL can still appear in results, without a description, if other pages link to it. Use a noindex meta tag on a crawlable page to keep it out of the index.

Where does the file go?

At the root of each domain or subdomain — example.com/robots.txt. A file in a subdirectory is ignored, and shop.example.com needs its own.

Should I block AI crawlers?

That is a business decision rather than a technical one. The directives are voluntary and honoured by well-behaved crawlers. Blocking them has no effect on your search rankings.

Related tools

See all seo tools →