Robots.txt Generator: Create and Test a Robots.txt File for SEO

Produce a correct robots.txt file in a few clicks. Keep crawlers away from private sections, point them to your sitemap, opt out of AI training bots, and check any address against your rules before the file goes live.

  • AI crawler blocking
  • Built-in URL tester
  • RFC 9309 compliant
Block AI crawlers
Block other bots
You can edit the result directly. The tester below checks whatever is in this box.
Test a URL

How to use the Robots.txt Generator tool

  1. Pick a defaultLet every bot in (ordinary websites) or shut them all out (staging and test sites).
  2. Add blocked pathsList folders or pages search engines shouldn’t crawl, plus any exceptions.
  3. Sitemaps and botsPaste the address of your sitemap and choose which AI or SEO crawlers to turn away.
  4. Test and downloadRun a few addresses through the checker, save the file and place it in the top-level folder of your domain.

Robots.txt generator features

  • Opt out of AI trainingTick boxes for the best-known AI bots from OpenAI, Anthropic, Google, Common Crawl, Perplexity and more.
  • Live URL checkerType any address and learn instantly whether a given bot may crawl it, plus the exact line responsible.
  • Wildcard supportAn asterisk matches any run of characters and a dollar sign anchors the end of a path, as Google and Bing allow.
  • Editable fileTweak the generated robots.txt by hand while the tester checks your changes live.
  • Standards-based matchingRules are evaluated as RFC 9309 describes: the most specific path takes priority, and Allow beats Disallow on a tie.

What is a robots.txt file?

Every site can publish a plain-text file called robots.txt at the top of its domain, for instance https://shop.example/robots.txt. Well-behaved crawlers, Googlebot and Bingbot among them, fetch it first to learn which paths are off limits. Site owners use it to steer bots away from back-office screens, on-site search pages, checkout steps and the near-infinite filter and sort variations that would otherwise eat into crawl budget.

Robots.txt syntax explained

  • User-agent: * opens a group of rules for every crawler.
  • User-agent: GPTBot opens a group that only OpenAI’s bot will follow.
  • Disallow: /admin/ blocks every path beginning with /admin/.
  • Allow: /admin/help/ re-opens one subfolder inside the blocked area.
  • Disallow: /*?sort= shuts out any address containing the sort parameter.
  • Disallow: /*.pdf$ stops crawlers fetching PDF files.
  • A Sitemap: line with a full URL tells bots where your XML sitemap lives.

Robots.txt is not a security measure

  • Anyone can read it. Listing a confidential directory in a public file draws attention to it, so lock sensitive areas behind a login.
  • Blocking crawling isn’t the same as removing a page. Google may still list a disallowed address when other websites point to it. If you want a page gone from results, let it be crawled and give it a noindex tag, which our Meta Tag Generator can produce.
  • Malicious bots don’t care. Search engines honour the file; scrapers and malware rarely do.

How to block AI crawlers

A growing number of companies send bots across the web to gather training data for language models. You can refuse several of the big ones in robots.txt: OpenAI’s GPTBot, Anthropic’s ClaudeBot, the Google-Extended token (which covers Google’s AI products but not ordinary Search), Common Crawl’s CCBot whose archive feeds many AI projects, plus Applebot-Extended, PerplexityBot, ByteDance’s Bytespider and Meta’s meta-externalagent. None of these affect where you rank in Google or Bing. Fresh bots launch all the time, so revisit the list every few months.

Installing your robots.txt

  1. Save the file under the exact lowercase name robots.txt.
  2. Put it in the top-level directory of the domain so it’s served at /robots.txt; crawlers never look for it anywhere deeper.
  3. Subdomains are treated as separate sites, so blog.example or shop.example each need their own copy.
  4. Confirm Google can read it using the robots.txt report inside Search Console.

Haven’t built a sitemap yet? The XML Sitemap Generator will create one for you.

Frequently asked questions

Where should robots.txt be placed?
At the very top of your domain, reachable as yourdomain.com/robots.txt. Crawlers won’t read a copy kept in a subfolder.
How can I block AI bots like GPTBot?
Select the bots you want to refuse; the tool writes a dedicated group naming them with a “Disallow: /” rule.
Does blocking AI crawlers affect Google rankings?
No. Google-Extended only decides whether Google’s AI products may learn from your pages. Ranking in Search depends on Googlebot, which is a different crawler.
Can robots.txt remove a page from Google?
No, it only governs crawling. To get a URL dropped from results, leave it crawlable and add a noindex tag.
What does an empty “Disallow:” line mean?
An empty Disallow blocks nothing, so crawlers may visit the entire site.