Home/Tools/SEO Tools/Robots.txt Generator

Robots.txt Generator

SEO Tools

Generate a robots.txt file for your website.

⚡ Instant🔒 Private, in your browser🆓 Free, no sign-up👥 For marketers and seo
Your data never leaves your browser. We do not store inputs.

What Robots.txt Generator does

The Robots.txt Generator writes a robots.txt file for your website and shows it as you type. Choose whether to allow crawling or block the whole site, list the paths you want crawlers to skip, add exceptions and your sitemap addresses, and optionally block 12 named AI crawlers or set a crawl delay. Presets cover WordPress, Next.js apps and online shops. Copy the result or download it as robots.txt. It runs in your browser.

FV
Reviewed by the FreeToolsVerse team · Last updated · How we check our tools

Features and benefits

  • Writes valid syntax and adds missing leading slashes to paths
  • Presets for WordPress, Next.js/general apps and e-commerce sites
  • Turns a bare domain into the standard /sitemap.xml address
  • Optional block for 12 named AI crawlers and a warning before you block the whole site

How to use Robots.txt Generator

  1. Choose "Allow crawling" (and list paths to block) or "Block the whole site"
  2. Enter the paths to block, one per line, or click a preset such as WordPress or E-commerce
  3. Add any exceptions, your sitemap address and, if you wish, block AI crawlers or set a crawl delay
  4. Copy the file or download robots.txt and upload it to the root of your site

Who should use it

Made for marketers and seo. Typical uses:

  • Keeping crawlers out of admin, cart, checkout and internal search pages
  • Pointing crawlers to your sitemap
  • Deciding whether AI crawlers may use your content

Example

Blocking /admin/ and /api/ and entering the sitemap as example.com produces a file with "User-agent: *", "Disallow: /admin/", "Disallow: /api/" and a final line "Sitemap: https://example.com/sitemap.xml". Choosing "Allow everything" with no paths writes an empty Disallow line, which blocks nothing.

Limitations and accuracy

Robots.txt controls crawling, not indexing: a blocked page can still appear in search results if other sites link to it, so use a noindex tag on a crawlable page to keep it out. The file is public and is only a request to well-behaved crawlers, so it does not hide anything. Google ignores the crawl-delay line, and paths are case-sensitive.

Accuracy: Results show what the tool can measure at the moment you run it and can differ from what search engines see. Use them as guidance.

Expert Tip

After you upload the file, open yourdomain.com/robots.txt to check it loads, and never leave "Disallow: /" on a live site. Do not block your CSS or JavaScript folders, because search engines need them to see the page.

Frequently asked questions

How does the Robots.txt Generator work?
Choose whether to allow crawling, list the paths to block (or click a preset), add your sitemap address and options, and the finished file appears at once. Copy it or download it and upload it to the root of your website.
Does robots.txt stop a page being indexed?
No. It stops well-behaved crawlers from requesting the page, but the address can still be indexed if it is linked elsewhere. To keep a page out of search results, leave it crawlable and add a noindex directive.
Can I block AI crawlers?
Yes. The option adds a block for 12 named crawlers, including GPTBot, ClaudeBot, CCBot, Google-Extended and PerplexityBot. Only crawlers that follow robots.txt respect it, and blocking search-style bots can also stop you being cited in AI answers.
Where do I put the file?
At the root of your domain, so it loads at yourdomain.com/robots.txt. Each subdomain needs its own file.
Is my data uploaded anywhere?
No. The file is built in your browser.

Robots.txt Generator: the complete guide

What a robots.txt file does

A robots.txt file is a plain text file at the root of a website, for example example.com/robots.txt, that tells crawlers which paths they may request. Search engines read it before they crawl. It controls crawling, not indexing: a page blocked in robots.txt can still appear in search results as a bare link if other sites link to it, because the crawler never sees the page to read a noindex tag. To keep a page out of search, leave it crawlable and add a noindex directive. The Robots.txt Generator writes the file for you and shows it as you type.

The options

You first choose whether to allow crawling and block only some paths, or to block the whole site. Then you can fill in these settings.

  • Paths to block: one per line, such as /admin/ or /api/. A missing leading slash is added. Preset buttons fill in common sets for WordPress (/wp-admin/, /wp-login.php, /?s=, /search/), Next.js and general apps (/api/, /admin/) and online shops (/cart, /checkout, /account/ and sorting and filter parameters).
  • Exceptions to allow: paths that stay open inside a blocked folder.
  • Sitemap URLs: one per line. If you type only a domain, the tool turns it into the standard /sitemap.xml address.
  • Block AI training crawlers: adds a separate block for 12 named bots: GPTBot, ChatGPT-User, OAI-SearchBot, ClaudeBot, anthropic-ai, CCBot, Google-Extended, PerplexityBot, Bytespider, Applebot-Extended, Meta-ExternalAgent and cohere-ai.
  • Crawl delay: a number of seconds between requests.

A worked example

With paths /admin/ and /api/ blocked and the sitemap entered as example.com, the file reads: User-agent: * on the first line, then Disallow: /admin/ and Disallow: /api/ on separate lines, then a blank line and Sitemap: https://example.com/sitemap.xml. With "Allow everything" and no paths, the tool writes an empty Disallow line, which means nothing is blocked. With "Block the whole site", it writes Disallow: /, and shows a red warning, because that removes a site from search results over time. Use it only for staging sites.

Rules and common mistakes

Paths are case-sensitive and match from the start of the address. Each host needs its own file, so blog.example.com does not use the file of example.com. The file must be plain UTF-8 text at the root, and Google reads only the first 500 KiB. The commonest mistake is leaving Disallow: / on after launch. Another is blocking CSS and JavaScript folders, which stops Google from seeing the page as visitors do. Robots.txt is also public, so do not list secret paths in it, and do not rely on it for privacy, because it only asks well-behaved crawlers to stay away. Google ignores the crawl-delay line, while some other search engines follow it.

Should you block AI crawlers?

The AI option is a choice, not a default. Well-behaved crawlers respect it, but it cannot stop those that ignore the file. Blocking Google-Extended and similar training crawlers affects how content is used for AI models, while blocking search-style bots such as OAI-SearchBot or ChatGPT-User can also stop your pages being cited in AI answers. Decide based on whether you want to be quoted or kept out.

After you upload it

Upload the file to the root and open yourdomain.com/robots.txt to confirm that it loads. Create a sitemap with the Sitemap Generator, then confirm that important pages return 200 with the HTTP Status Checker and that moved pages redirect with the Redirect Checker. The guide to robots.txt, sitemaps and canonical tags shows how the three fit together. The generator runs in your browser.

Learning resources

Explore more in SEO Tools, read the guides and articles, or see how we test our tools.

Share This Tool