How to use the Robots.txt Generator tool
- Set the defaultAllow all crawlers (normal websites) or block everything (staging and test sites).
- List what to blockAdd folders or pages to keep out of search engines, with optional exceptions.
- Add sitemaps and bot rulesEnter your sitemap URL, and tick any AI crawlers or SEO bots you want to block.
- Test and downloadCheck URLs with the tester, then download robots.txt and upload it to your site’s root folder.
Features
- AI crawler blockingOne-click rules for GPTBot, ClaudeBot, Google-Extended, CCBot, PerplexityBot and more.
- URL testerSee instantly whether Googlebot or another crawler may fetch a URL, and which rule decides it.
- Wildcards supportedUse * for any characters and $ for “ends with”, as supported by Google and Bing.
- Editable outputFine-tune the generated file by hand; the tester checks your edits live.
- Standards-basedMatching follows the official robots.txt standard (RFC 9309): longest match wins, Allow wins ties.
What is robots.txt?
robots.txt is a small text file at the root of your website, for example https://www.example.com/robots.txt, that tells crawlers which parts of the site they may visit. Search engines like Google and Bing check it before crawling. It’s useful for keeping crawlers out of admin areas, internal search results, shopping carts and endless filter combinations that waste crawl budget.
robots.txt syntax
| Line | Meaning |
|---|---|
User-agent: * | The rules below apply to all crawlers |
User-agent: GPTBot | The rules below apply only to OpenAI’s crawler |
Disallow: /admin/ | Don’t crawl anything starting with /admin/ |
Allow: /admin/help/ | Exception: this folder may be crawled |
Disallow: /*?sort= | Block any URL containing ?sort= |
Disallow: /*.pdf$ | Block URLs that end in .pdf |
Sitemap: https://…/sitemap.xml | Where to find your XML sitemap |
Important: robots.txt is not a security tool
- It doesn’t hide pages. The file is public, and listing a secret folder actually advertises it. Protect private areas with a password.
- It doesn’t remove pages from Google. A blocked URL can still appear in results if other sites link to it. To keep a page out of search, allow crawling and add a
noindexmeta tag instead (see our Meta Tag Generator). - Bad bots ignore it. Reputable crawlers follow robots.txt; scrapers and malware usually don’t.
Blocking AI crawlers
Many AI companies crawl the web to train language models. You can opt out of several of them in robots.txt: GPTBot (OpenAI), ClaudeBot (Anthropic), Google-Extended (Google’s AI models; regular Google Search is not affected), CCBot (Common Crawl, used by many AI projects), Applebot-Extended, PerplexityBot, Bytespider and meta-externalagent. Blocking them doesn’t affect your rankings in Google or Bing search. New crawlers appear regularly, so review your file from time to time.
How to install robots.txt
- Download the file. It must be named exactly
robots.txtin lowercase. - Upload it to the root folder of your website, so it opens at yourdomain.com/robots.txt. A robots.txt inside a subfolder is ignored.
- Each subdomain (such as shop.example.com) needs its own file.
- Check it in Google Search Console’s robots.txt report.
Don’t have a sitemap yet? Create one with the XML Sitemap Generator.