Robots.txt Generator

Build a valid robots.txt file to control search engine crawling.

100% Free · No Sign-up · Runs in Your Browser

About the Robots.txt Generator

The robots.txt file tells search engine crawlers which parts of your site they may or may not access, and it's one of the first files most crawlers check when visiting a domain. A single misconfigured rule can accidentally block your entire site from search engines, so getting the syntax exactly right matters. This generator builds a correct robots.txt file from a simple visual form.

This tool is useful for site owners and developers launching a new website who need to control crawler access, SEO specialists managing crawl budget on large sites, and anyone needing to quickly block staging or admin areas from being indexed.

To use it, add rules by choosing a user-agent (like * for all crawlers, or Googlebot specifically), and specify Allow or Disallow paths. You can add multiple rule blocks for different crawlers, plus an optional sitemap URL. The generated robots.txt content updates live and can be copied or downloaded directly.

For example, disallowing /admin/ and /wp-admin/ for all user-agents while allowing everything else produces: User-agent: * Disallow: /admin/ Disallow: /wp-admin/ Sitemap: https://example.com/sitemap.xml — a standard configuration for most content management systems that keeps sensitive backend areas out of search results while allowing the rest of the site to be crawled normally.

A critical mistake to avoid is accidentally disallowing "/" for all user-agents, which blocks your entire website from being crawled and indexed — always double-check your rules before deploying, especially after moving a site from staging to production (a very common cause of sites disappearing from search results). Another common error is assuming robots.txt prevents a page from ever appearing in search results; it only prevents crawling, not indexing — a disallowed URL can still appear in search results without a description if it's linked from elsewhere, so use a noindex meta tag for pages you truly want excluded from search results.

Tip: always place your robots.txt file at the root of your domain (https://example.com/robots.txt), since crawlers only check that exact location, and reference your XML sitemap inside it to help search engines discover your pages more efficiently.

Frequently Asked Questions

Q.Where should robots.txt be placed?

At the root of your domain, e.g. https://example.com/robots.txt — crawlers won't check any other location.

Q.Does Disallow prevent a page from appearing in search results?

Not necessarily. It prevents crawling, but a disallowed URL can still be indexed without a snippet if linked from elsewhere. Use a noindex meta tag to fully exclude a page.

Q.What does Disallow: / do?

It blocks the entire site from being crawled by the specified user-agent — a mistake that can remove your whole site from search results.

Q.Can I have different rules for different crawlers?

Yes, add multiple User-agent blocks, each with its own Allow/Disallow rules.

Q.Should I include my sitemap in robots.txt?

Yes, adding a Sitemap: line helps search engines discover your sitemap and crawl your site more efficiently.

Related Tools