Toolvist

Robots.txt Generator

Generate a robots.txt file for your website.

Free Robots.txt Generator

The Robots.txt Generator builds a robots.txt file that tells search-engine crawlers which parts of your site to crawl or avoid. Add your rules and sitemap, then copy the result.

The companion file is produced by the XML Sitemap Generator, and its entries should match what this file permits. For canonicalising the pages it allows, the Canonical Tag Generator is the next step.

How to use the Robots.txt

  1. 1 Choose a preset for a common configuration, or start from a blank rule set.
  2. 2 Add user-agent groups, setting allow and disallow paths for each crawler you want to address.
  3. 3 Add the sitemap location and, if you need it, a crawl-delay directive.
  4. 4 Copy the generated file and upload it to the root of your domain.

What the file can and cannot do

The file is a set of crawl instructions, not a security control. It is a public document, and it is advisory: well-behaved crawlers follow it, and there is nothing preventing a scraper from ignoring it entirely while reading the list of paths you have just helpfully enumerated. Anything genuinely private must sit behind authentication rather than behind a disallow rule.

Its real value is steering crawl budget. On a large site, telling crawlers not to waste time on search result pages, filter combinations, and internal endpoints leaves more capacity for the pages that should rank. That is the practical case for the file, and it is a good one.

Rules worth including

  • Block administrative and account paths, which have no search value and can expose more than they should.
  • Block internal search results, since these produce near-duplicate pages at scale.
  • Leave CSS and JavaScript crawlable; blocking them prevents the renderer from seeing your pages as users do.
  • List the sitemap explicitly, as it is one of the few directives with unambiguous benefit.

Frequently asked questions

Does a disallow rule hide a page from search results?

Not reliably, and this is the single most damaging misconception about the file. A disallowed URL can still be indexed if other pages link to it, because the rule prevents crawling rather than removal. The page will appear in results with a description drawn from whatever the crawler learned elsewhere. To keep a page out of the index you need a noindex directive on the page itself, which requires the crawler to be able to read it.

Where must the file live?

At the root of the domain, at exactly /robots.txt, with that name. A file in a subdirectory is not read by crawlers following the standard. This means each subdomain needs its own copy, and a site served from a subdirectory of another domain cannot host one that applies to its own paths.

What if there is no file at all?

Crawlers then assume everything is permitted, which is usually fine and occasionally disastrous — a staging environment left reachable and unmentioned gets crawled and competing with the live site. An explicit file is not required by the standard, but having one gives you a place to record the decisions you have made.

Related SEO & Webmaster Tools

Browse all SEO & Webmaster Tools →

You might also need

Tools from other categories that people pair with the Robots.txt:

Browse the full tool directory →