Util Tools logo Util Tools
SEO Tools

Robots.txt Generator

Build a valid robots.txt with allow/disallow rules per user-agent, add your sitemap, and block AI crawlers in one click. Live preview, copy, and download - all in your browser.

  • 100% free
  • No signup
  • Runs in your browser

Rules

Generated robots.txt
Guide

What is robots.txt?

robots.txt is a plain text file at the root of your site that tells crawlers which parts they may or may not request. It uses simple rules: a User-agent line names the crawler, then Disallow and Allow lines list paths. This generator builds a valid file with per-crawler rules, your sitemap, and one-click blocking of AI crawlers.

Where it goes and why you need one

The file must live at yourdomain.com/robots.txt; crawlers look for it there and nowhere else. You do not strictly need one (a site with no robots.txt is fully crawlable), but it is useful for keeping crawlers out of admin areas, search-result pages, and duplicate content, and for pointing them to your sitemap. Including a sitemap line helps search engines discover your pages.

Allow vs. Disallow, and what it really controls

Disallow blocks a path from being crawled; Allow creates an exception within a blocked section. An important caveat: robots.txt is a crawling instruction, not a security or privacy control. It politely asks compliant crawlers to stay out, but it does not prevent access, and a disallowed URL can still be indexed if linked elsewhere. To truly keep a page out of search, use a noindex tag or authentication.

Blocking AI crawlers

A growing reason to edit robots.txt is to control whether AI companies can scrape your content to train models. You can disallow specific user-agents such as GPTBot, Google-Extended, CCBot, and others. This tool includes presets so you can block the major AI crawlers in one click if you prefer your content not be used for training, while keeping normal search engines welcome.

Last updated: July 2026

Frequently Asked Questions

What is a robots.txt file?
A robots.txt file is a plain-text file at the root of your domain that tells search-engine crawlers which parts of your site they may or may not request. It uses simple User-agent, Allow, and Disallow directives.
Where do I upload robots.txt?
Place the file at the root of your domain so it is reachable at https://yourdomain.com/robots.txt. Crawlers always look for it there; a robots.txt in a subfolder is ignored.
Does robots.txt block search engines completely?
No. robots.txt only requests that compliant crawlers not fetch certain paths - it does not enforce access or hide a page from being indexed if other sites link to it. To keep a page out of search results, use a noindex meta tag or HTTP header instead.
How do I block AI crawlers like GPTBot?
Add a rule for each AI crawler user-agent (such as GPTBot, CCBot, Google-Extended, ClaudeBot, and PerplexityBot) with "Disallow: /". The "Block AI crawlers" preset in this tool adds them all at once.
What is the difference between Allow and Disallow?
Disallow tells a crawler not to fetch matching paths; Allow explicitly permits a path, which is useful to carve out an exception inside a disallowed folder. More specific rules take precedence in modern crawlers.
Do I need a robots.txt file?
It is optional. If you have nothing to block, you can omit it or serve an empty "allow all" file. It becomes useful for excluding admin areas, blocking AI crawlers, or pointing crawlers to your sitemap.