Tools/SEO Tools/Robots.txt Generator

Robots.txt Generator Free - Google Compliant

Build and download robots.txt rules grouped by user-agent, with optional sitemap and crawl-delay settings. Preview the file locally; this tool does not test a live site or guarantee indexing.

If this tool isn’t working as expected, please take a screenshot of the error and report the problem here so we can investigate and improve it.

Technical Behavior

Preview a crawler-policy file before publishing it at the relevant site root. Robots.txt manages requests by cooperating crawlers; it is not access control and does not reliably keep a URL out of search results.

Protect private admin or staging content with authentication. To use noindex, the crawler must be able to fetch the page or header containing it.

Build robots.txt rules grouped by user-agent. Each added rule remembers the selected agent, so you can add several groups to one file. Sitemap gives crawlers a discovery hint; Crawl-delay is optional and unsupported by Google.

Robots.txt syntax and common pitfalls

Learn user-agent precedence, wildcards, and why Disallow does not act like noindex.

How to Use Robots.txt Generator

Choose Rules

Add Allow or Disallow rules under an agent, then change the agent to add another group.

Customize Options

Add crawl delay and sitemap URL if required.

Preview Robots.txt

Instantly preview the generated robots.txt file in real format.

Copy or Download

Copy the robots.txt content or download it as a file.

Practical Workflows

Start From a Preset

Click Allow All, Block All, or Block Admin to load a ready-made rule set for user-agent "*", then adjust from there.

Add Rules for a Specific Bot

Enter an agent name and add its Allow/Disallow paths. Change the agent name before adding rules for another group. Existing rules retain their original agent.

Add a Sitemap and Crawl-Delay

Add one optional sitemap URL and a positive crawl delay if the intended crawler supports it. The delay is written to every generated group; Google ignores it.

Preview, Copy, and Download

Check the live preview on the right, then click Copy Code or Download File. The download is named exactly robots.txt (upload it to your site's root) and ends with a single newline.

What to expect

  • Add rules for several agents in one output. Changing the agent field affects newly added rules; existing rules keep their own agent.
  • Includes an optional Sitemap URL line for discovery; this does not guarantee crawling or indexing.
  • Four one-click presets - Allow All, Block All, Block Admin, and Custom/Reset - as starting points instead of a blank form.

Sample Input & Output

A basic robots.txt with an admin block and sitemap

Input

User-agent: *, Rules: Allow /, Disallow /admin, Disallow /wp-admin, Sitemap: https://example.com/sitemap.xml

Output

User-agent: *
Allow: /
Disallow: /admin
Disallow: /wp-admin

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

Rules are automatically sorted alphabetically by path in the output, regardless of the order you added them in.

Common Pitfalls

Problem

Expecting the agent field to rename existing rules

Solution

Each rule retains the agent used when it was added. Remove and re-add a rule to move it to another group.

Problem

Adding Crawl-delay and expecting Google to honor it

Solution

Google does not read the Crawl-delay directive at all - it only has an effect on crawlers that support it, such as Bing's.

Problem

Entering 0 or a negative Crawl-delay value

Solution

This clears the entire preview, not just the Crawl-delay line - use a positive number, or leave the field blank.

Problem

Entering an invalid Sitemap URL

Solution

An invalid URL (no http:// or https://, or containing a space) is flagged with a red border and an error message, and also clears the entire preview until it's fixed or removed.

Problem

Assuming Disallow removes a page from Google's index

Solution

Disallowing a URL only blocks crawling - it doesn't guarantee the page stays out of the index. Allow crawling so Google can read the noindex meta tag or response header.

Technical Scope & Privacy

Several groups, one shared crawl-delay setting

Rules are grouped by their stored agent. The optional delay value applies to every group, while the single sitemap URL is appended once.

Crawl-delay isn't read by Google

The Crawl-delay directive is included if you set it, but Google's crawlers ignore it entirely - only some other search engines may honor it.

No rule testing or validation against a live site

The tool generates syntactically correct output but doesn't test it against your actual site or verify how any specific crawler will interpret it.

No dedicated AI-crawler presets

There's no built-in button or list for AI crawlers - you target them by typing their exact user-agent name yourself, the same way as any other bot.

Doesn't control search-index removal

This generates a robots.txt file only - it doesn't prevent an already-indexed page from appearing in search results (Google must be able to crawl a page or response to read its noindex instruction).

Invalid delay or sitemap clears the preview

Fix or clear an invalid delay or sitemap to restore output. An invalid current agent prevents adding a rule; it clears output only when no stored rules exist and that agent would be used for the output.

Comparison

Disallow Rule vs. Noindex Meta Tag

Both control search engine behavior, but they do fundamentally different jobs.

Disallow (robots.txt)Noindex (meta tag on the page)
What it controlsWhether crawlers are allowed to request the URLWhether the page is allowed to appear in search results
Can the page still be indexed?Yes - if other sites link to it, it can still be indexed without being crawledNo - noindex reliably keeps it out, but only if the page can still be crawled to see the tag
Where it livesOne shared file at your site's rootA meta tag on each individual page

Which should you use?

Use Disallow to manage crawler traffic and server load; use noindex when your actual goal is keeping a specific page out of search results.

Frequently Asked Questions

The most common question is what robots.txt can and can't do. It controls which pages crawlers are allowed to request - it does not remove a page from Google's index by itself (a blocked page can still appear in search results if other sites link to it; use noindex on a crawlable page or response to request index exclusion). The FAQ below also covers crawl-delay, AI crawlers, and where to place the file.

Does Google support the Crawl-delay directive?

No. Google's crawlers ignore Crawl-delay entirely, even though this tool lets you add it. Some other search engines, like Bing, may honor it - only set it if you're targeting a non-Google crawler.

Does blocking a page in robots.txt remove it from Google's index?

No. A disallowed URL can still appear in search results. For a noindex instruction to be seen, allow the crawler to fetch the page or response header containing it. Use authentication for private content; robots.txt is public crawler guidance, not a security boundary.

Can I block AI crawlers like GPTBot?

Yes. Type the bot's exact user-agent name (for example, GPTBot, CCBot, or Google-Extended) into the User-agent field and add Disallow rules for it. There's no dedicated AI-crawler preset - each added rule keeps its selected token. Check the provider's documentation for what the token controls; it is not network access control.

Can I set different rules for multiple bots in one file?

Yes. Add rules with the first agent selected, change the agent field, then add rules for another agent. The preview keeps separate groups and does not reassign earlier rules. The optional crawl delay is repeated in each group; the sitemap appears once.

Where do I put the finished robots.txt file?

At the root of your domain (e.g., https://example.com/robots.txt) - search engines only look for it there, not in a subfolder.

Get more tools like this

Leave your email so we can prioritize similar tools and updates.

Related Tools