Skip to main content

Free Online Robots.txt Generator

Build robots.txt rules visually with presets for AI bot blocking

Quick Start Presets

Rule Group 1

The crawler this rule applies to. Use * for all bots.

Seconds between requests. Respected by Bing and Yandex, ignored by Google.

Full URL to your XML sitemap. Helps search engines discover your pages.

User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

robots.txt controls how search engines crawl your site. Incorrect rules can prevent pages from appearing in search results. Test your file using Google Search Console before deploying to production.

Processed locally
Zero server requests
Works offline
Nothing leaves your device

Why use Robots.txt Generator

  • Visual rule builder means you don't have to look up robots.txt syntax every time you touch the file.
  • Block AI Bots preset blocks GPTBot, CCBot, Google-Extended, and anthropic-ai in one click while keeping Googlebot and Bingbot active.
  • Built-in warnings catch dangerous patterns (like Disallow: / under User-agent: *) before they go live.
  • Sitemap directive is auto-formatted and placed correctly outside user-agent groups.
  • Quick-start presets cover the three most common configurations: open, blocked, and AI-blocked.
  • Download as a robots.txt file or copy the content -- either workflow.

How it works

The generator converts your form selections into valid robots.txt syntax following the Robots Exclusion Protocol. Each rule group maps to a User-agent line followed by Allow and Disallow directives for the paths you specify. Directives are written in the order you add them, with the most specific path winning when multiple rules match the same URL. An optional Crawl-delay value is appended per group for crawlers that support request throttling. The Sitemap directive is placed at the end of the file outside any group because it applies globally. Built-in validation checks for dangerous patterns like Disallow: / under User-agent: *, duplicate user-agent groups that could confuse crawlers, and sitemap URLs missing the https:// protocol. The output updates reactively as you edit, so you always see the exact file content before copying or downloading.

About this tool

A misconfigured robots.txt can block Googlebot from your entire site or leave a staging environment indexed. The syntax is simple but unforgiving, and most people only touch this file once a year -- easy to get wrong. This generator lets you build rules visually. Pick user-agents from a dropdown (Googlebot, Bingbot, Yandex, GPTBot, ChatGPT-User, Google-Extended, CCBot, anthropic-ai), add Allow and Disallow directives, set an optional crawl-delay, and include your sitemap URL. Quick-start presets handle the most common setups in one click: Allow All for a standard open site, Block All for staging environments, or Block AI Bots to prevent LLM training crawlers from accessing your content while keeping search engines active. Built-in warnings flag dangerous patterns like blocking all crawlers from your root path. Copy the finished file or download it as robots.txt ready to deploy.

How to use Robots.txt Generator

  1. Choose a preset or start from scratch. Select a quick-start preset like Allow All, Block All, or Block AI Bots to pre-fill common configurations, or start with the default settings and customize from there.
  2. Add user-agent rules. Pick a crawler from the dropdown (Googlebot, Bingbot, GPTBot, or any custom bot name) and add Allow or Disallow directives for the paths you want to control.
  3. Add your sitemap URL. Enter the full URL of your XML sitemap so search engines can discover all your pages. This is added as a global Sitemap directive at the end of the file.
  4. Review warnings and output. Check the live preview for your generated robots.txt content. The tool warns you about dangerous patterns like blocking all crawlers from your entire site.
  5. Copy or download. Click Copy to grab the content for pasting, or Download to save it as a robots.txt file. Upload it to the root directory of your website.

Use cases

  • Launching a SaaS product. Allow all public pages, block /api/ and /admin/. Generate the file, upload it, move on.
  • An SEO agency managing 30 client sites needs standardized robots.txt files during audits. Generate each one in seconds instead of writing from memory.
  • A publisher wants to block AI training crawlers but keep Google and Bing active. Hit the Block AI Bots preset.
  • Staging site is live for QA but shouldn't appear in search results. Use the Block All preset until launch day.
  • CMS migration changed the directory structure. Rebuild the robots.txt to match the new paths and update the sitemap URL.

Frequently Asked Questions

A robots.txt file is a plain text file placed in the root directory of your website (e.g., example.com/robots.txt) that tells search engine crawlers which pages and directories they can or cannot access. It follows the Robots Exclusion Protocol, a standard that all major search engines respect. The file contains rules organized by user-agent (the name of the crawler) with Allow and Disallow directives that control access to specific URL paths.

Use this generator to build your rules visually. Select which crawlers you want to target, add Allow or Disallow directives for each path, include your sitemap URL, and copy or download the generated file. Upload the file to the root directory of your website so it is accessible at yourdomain.com/robots.txt. Most web hosts let you upload files via FTP, cPanel File Manager, or your CMS settings.

The robots.txt file must be placed in the root directory of your website and served at the exact URL yourdomain.com/robots.txt. Search engines only look for it at that specific location. If your site uses subdomains, each subdomain needs its own robots.txt file. On most hosting platforms, the root directory is called public_html, www, or public.

The Disallow directive tells a crawler not to access a specific URL path. For example, Disallow: /admin/ prevents the specified bot from crawling anything under the /admin/ directory. An empty Disallow value (Disallow: with nothing after it) means allow everything, which is a common source of confusion. To block an entire site, use Disallow: / which blocks all paths starting from the root.

Yes. Adding a Sitemap directive (e.g., Sitemap: https://example.com/sitemap.xml) helps search engines discover your XML sitemap even if it has not been submitted through Google Search Console or Bing Webmaster Tools. The Sitemap directive is placed outside any user-agent group because it applies globally to all crawlers. You can list multiple sitemaps if your site has more than one.

Robots.txt affects SEO indirectly by controlling crawl budget and page discovery. It does not prevent pages from being indexed if other sites link to them. To prevent indexing, use a meta robots noindex tag instead. However, a misconfigured robots.txt that blocks Googlebot from important pages will cause those pages to disappear from search results, which can devastate organic traffic.

Robots.txt controls crawling, which is whether a bot visits your page at all. Meta robots tags control indexing, which is whether a page appears in search results after being crawled. Robots.txt blocks access at the server level before the crawler downloads the page. A noindex meta tag requires the crawler to visit the page first and then instructs it not to list the page in results. Use robots.txt for directories you never want crawled and meta robots for pages that can be crawled but should not appear in search results.

Add separate user-agent blocks for each AI crawler you want to block. Common AI bot names include GPTBot (OpenAI), ChatGPT-User, Google-Extended (Gemini training data), CCBot (Common Crawl), and anthropic-ai (Claude). For each one, add User-agent: followed by the bot name and Disallow: / on the next line. This generator includes a Block AI Bots preset that sets up all these rules in one click.

Yes, you can block any path including image and CSS directories. However, Google strongly recommends against blocking CSS, JavaScript, and image files because Googlebot needs to render your pages to understand their content and layout. Blocking these resources can hurt your search rankings because Google cannot properly evaluate the user experience of your pages.

Use Google Search Console's robots.txt Tester tool to check whether specific URLs are blocked or allowed by your rules. Enter the URL you want to test and the tool shows which rule matches. You can also check your live robots.txt by visiting yourdomain.com/robots.txt in a browser. After deploying changes, allow a few days for search engines to re-fetch the file.