MyToolsBay
SEO tool

Robots.txt Generator

Generate a robots.txt file to define crawler access rules for your website and optionally include your XML sitemap URL.

Crawler rules

Generated file

Your robots.txt content will appear here.

Important: robots.txt is a crawler instruction file, not an access control or security mechanism. Check your rules before publishing.

What this generator does

Choose a crawler, add Allow or Disallow rules, optionally add your sitemap URL, and the tool writes a robots.txt file you can copy or download. Paths must begin with / and cannot contain line breaks.

The file is generated in your browser; nothing is uploaded.

How crawlers actually read robots.txt

A crawler fetches robots.txt from the root of the site, for example https://example.com/robots.txt. It is an instruction file, not a security control: it does not hide content from people, and a blocked URL can still appear in search results without a snippet if other pages link to it.

  • To keep a page out of search results, use a noindex directive instead of blocking the crawl.
  • Allow and Disallow words are matching instructions, not permissions.
  • Different crawlers may honour rules differently, and some ignore them entirely.

Common setups

GoalTypical rules
Block admin and account areasDisallow: /admin/ and Disallow: /account/
Block internal search pagesDisallow: /search
Allow everythingDisallow: (leave the path empty)
Point crawlers to the sitemapSitemap: https://example.com/sitemap.xml

Limitations to know before you start

  • The generated file contains one user-agent group; generate again for each additional crawler.
  • There is no crawl-delay, no XML sitemap creation, and no per-page rules.
  • Paths are written exactly as typed — check wildcards and trailing slashes yourself.
  • A wrong rule can hide pages you want indexed, so review before uploading.

How to use it

  1. 1Choose the crawler user-agent.
  2. 2Enter the paths you want to allow or disallow.
  3. 3Add your sitemap URL if available.
  4. 4Generate and download your robots.txt file.

Features

  • ✓ Custom user-agent directives
  • ✓ Allow and disallow rules
  • ✓ Optional sitemap directive
  • ✓ Plain-text file output
  • ✓ Copy or download generated rules
  • ✓ No account required

Privacy

Files and text you enter are processed in your browser and are not uploaded to our servers. Our server records only an anonymous count that the tool was used — never your file or input. Read our Privacy Policy.

Frequently asked questions

What is robots.txt?

Robots.txt is a text file that communicates crawler access rules for URLs on a website.

Does robots.txt prevent a page from appearing in search results?

Not necessarily. Blocking crawling does not guarantee that a URL will be excluded from search results.

Where should I upload robots.txt?

It is normally placed at the root of your website, such as https://example.com/robots.txt.

Which crawlers can I target?

All crawlers (*), Googlebot, or Bingbot. The generated file contains one user-agent group, so create a separate file per crawler if you need different rules.

Should I disallow pages I do not want indexed?

Use a noindex tag instead. A disallowed page can still appear in results without a snippet when other sites link to it.

Can I include my sitemap?

Yes. Add the full sitemap URL and the tool writes a Sitemap line at the end of the file.

Does robots.txt protect private files?

No. It is an instruction, not access control. Use authentication for anything private.