Robots.txt Generator

Choose a preset or add your own rules, include your sitemap, and download a robots.txt file. Then test any URL to see whether a crawler is allowed to visit it.

SEO & Web Tools Runs in your browser Free, no sign-up Generator + tester
Presets:

How to create a robots.txt file

  1. Start from a presetAllow all, Block all, Block AI crawlers or a WordPress-friendly setup, or keep the example rules.
  2. Edit the rulesEach rule has a user-agent (which crawler), Allow or Disallow, and a path. Add your sitemap URL at the bottom.
  3. Test and downloadType a URL and pick a crawler to see if it's allowed, then download robots.txt and upload it to the root of your site.

How robots.txt rules work

Robots.txt sits at yoursite.com/robots.txt and tells well-behaved crawlers which parts of a site they may visit. Rules are grouped by User-agent; a crawler follows the group that names it most specifically, or the * group if none does. Within a group, the longest matching path wins, and if an Allow and a Disallow match equally, Allow wins. * matches any characters and $ marks the end of a URL, so Disallow: /*.pdf$ blocks all PDF files. The tester follows these same rules, which are the ones Google documents.

Blocking AI crawlers

Many site owners now choose whether their content can be used to train AI models. The Block AI crawlers preset adds Disallow rules for common AI and dataset crawlers such as GPTBot, ClaudeBot, CCBot, PerplexityBot and Google-Extended, while still allowing normal search engines. Blocking Google-Extended does not remove your site from Google Search. Bear in mind that robots.txt is a request, not a lock: reputable crawlers respect it, but it can't stop bad bots.

Common robots.txt mistakes

  • Blocking the whole site by accident with Disallow: / left over from a test site.
  • Using robots.txt to hide private pages. The file is public; protect private areas with passwords instead.
  • Blocking CSS and JavaScript, which stops Google seeing your pages properly.
  • Expecting Disallow to remove pages from Google. Use a "noindex" meta tag for that; check your tags with the Meta Tag Previewer.
  • Forgetting the sitemap line. Make one with the XML Sitemap Generator.

Frequently asked questions

Where do I put robots.txt?

In the root folder of your domain, so it opens at https://yourdomain.com/robots.txt. Each subdomain needs its own file.

Does robots.txt stop pages appearing in Google?

Not reliably. It stops crawling, but a blocked page can still be listed if other sites link to it. Use a noindex tag to keep a page out of search results.

Does Google follow Crawl-delay?

No. Google ignores Crawl-delay; some other search engines respect it.

Will blocking AI bots hurt my SEO?

Blocking AI training crawlers like GPTBot or Google-Extended doesn't affect normal Google or Bing search rankings.

More seo & web tools tools