Robots.txt Generator

Create a robots.txt file: allow, disallow, sitemap and AI crawlers.

Result

User-agent: *
Allow: /admin/help/
Disallow: /admin/
Disallow: /cart/
Disallow: /search?

Sitemap: https://example.com/sitemap.xml
7 lines · 129 bytes
  • Save this as robots.txt in the root of your site (https://example.com/robots.txt).
  • robots.txt is a request, not security: polite crawlers follow it, bad ones ignore it, and blocked pages can still appear in search results if other sites link to them. Use noindex or a login to keep pages out.

What is a robots.txt file?

A robots.txt file sits at the top of a website and tells crawlers, such as search engine bots, which paths they may and may not visit. It is a plain text file with groups of rules: a User-agent line names the crawler, and Disallow and Allow lines list paths.

It is a request, not security. Well-behaved crawlers follow it, but bad ones ignore it, and a blocked page can still appear in search results if other sites link to it. This tool writes the file for you, including a Sitemap line and an optional group asking a list of AI crawlers not to use your site. It follows RFC 9309.

How to use the Robots.txt Generator

  1. List the paths to block, one per line.
  2. List any exceptions to allow.
  3. Add your sitemap address and choose whether to block AI crawlers.
  4. Copy the file and save it as robots.txt in your site root.

Real situations

When people use the Robots.txt Generator

  • 1

    Keep crawlers out of admin and cart pages

    Block paths such as /admin/ or /cart/ that give search engines no value.

  • 2

    Point crawlers to your sitemap

    Add the full sitemap address to the file so that search bots can find your list of pages more easily.

  • 3

    Ask AI crawlers not to use your content

    Add a group that disallows well-known AI crawlers, while ordinary search bots are untouched.

  • 4

    Create a starter file for a new site

    Generate a correct file in seconds and save it as robots.txt in your site's root.

Good to know

  • Paths must start with a slash. Never use robots.txt to hide private data.

FAQ

Robots.txt Generator: questions answered

Where do I put the file?

At the root of the site, so it is reachable as /robots.txt on your domain. Crawlers do not look for it anywhere else, and each host or subdomain needs its own.

Does robots.txt hide pages from Google?

Not reliably. It stops polite crawlers from fetching the page, but the address can still appear in results if other sites link to it. To keep a page out of search, use a noindex tag or require a login.

What does the sample file contain?

For paths /admin/, /cart/ and /search?, with /admin/help/ allowed, it writes User-agent: *, an Allow line, three Disallow lines and a Sitemap line. The longer, more specific rule wins when rules overlap.

Does blocking AI crawlers work?

It only asks. The tool adds 14 well-known crawlers, such as GPTBot and ClaudeBot, but names change and some crawlers ignore the file. Check each company's documentation for the current list. Googlebot is not affected.

Will Google obey Crawl-delay?

No. Google ignores it. Some other crawlers, such as Bing, respect it. Leave it at 0 unless you know a particular crawler needs it.

How can I check that the file works?

Paste it into the robots.txt tester, choose a crawler and test sample paths. It shows which rule decides each one.

Is this Robots.txt Generator free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way