This robots.txt generator builds a valid robots.txt file from a few choices. Pick a default rule, list the paths to disallow or allow, add your sitemap URL and optionally block AI training crawlers. Copy the result or download it, then upload it to the root of your site.
How to use the Robots.txt Generator
- Choose the default ruleAllow crawling for a normal public site. Block the whole site only for staging or private sites.
- List pathsEnter one path per line to disallow, such as /admin/, and any exceptions to allow.
- Add your sitemapPaste the full URL of your XML sitemap so crawlers can find it.
- Download and uploadDownload robots.txt and place it at the root of your domain, for example https://example.com/robots.txt.
How the robots.txt generator works
A robots.txt file is a plain text file at the root of a site that tells crawlers which URLs they may request. The robots.txt generator writes it in the standard format (RFC 9309):
User-agent:names the crawler a group of rules applies to.*means every crawler without a group of its own.Disallow:lists a path prefix that should not be crawled. An emptyDisallow:allows everything.Allow:makes an exception inside a disallowed folder. The most specific (longest) matching rule wins.Sitemap:gives the full URL of an XML sitemap. It must be an absolute URL.
Paths are case-sensitive and should start with a slash. If you paste a full URL in a path field, the tool keeps only the path. Wildcards are supported by major search engines: * matches any characters and $ marks the end of a URL, as in /*.pdf$.
Need a sitemap first? Build one with the XML sitemap generator.
What robots.txt can and cannot do
The file controls crawling, not indexing, and that difference causes most mistakes:
- A blocked page can still appear in search. If other sites link to it, Google may index the bare URL without reading it. To keep a page out of results, allow crawling and add a
noindexrobots meta tag with the meta tag generator. - It is not security. The file is public and well-behaved crawlers follow it voluntarily. Protect private content with a login.
- Do not block CSS and JavaScript that pages need. Search engines render pages and need those files.
- One file per host. A subdomain such as blog.example.com needs its own robots.txt.
The AI option adds a group for crawlers that collect training data, including GPTBot, ClaudeBot, Google-Extended, CCBot, Applebot-Extended, Bytespider and meta-externalagent. A crawler with its own group ignores the * group. Blocking these does not affect normal Google or Bing search, but compliance is up to each company, and new crawlers appear regularly.
Be careful with "Block the whole site": on a live site it asks search engines to stop crawling everything.
Frequently asked questions
Where do I put the robots.txt file?
In the root folder of your site, so it loads at https://yourdomain.com/robots.txt. It must be named exactly robots.txt, in lower case. A file in a subfolder is ignored.
Does Disallow remove a page from Google?
No. Disallow only stops crawling. A blocked URL can still be indexed if other pages link to it. To remove a page from results, let it be crawled and add a noindex robots meta tag.
What does "User-agent: *" mean?
The asterisk means the rules apply to every crawler that does not have a more specific group of its own in the file.
Can I block AI crawlers with robots.txt?
You can ask them not to crawl. The robots.txt generator can add rules for common AI training crawlers. Reputable companies say they respect these rules, but robots.txt cannot force any crawler to comply.
Is the robots.txt generator free?
Yes. It is free, needs no sign-up and builds the file in your browser. Nothing is uploaded.
Last updated 24 November 2026 by the TheTechFolk team.