Robots.txt Generator

Build a robots.txt file with the rules you actually need.

SEO Tools Free, no sign-up Runs in your browser

Robots.txt Generator tool

Rule groups

robots.txt

Blocking a page here stops crawlers requesting it, but does not remove it from search results. To keep a page out of an index, allow the crawl and use a noindex meta tag instead.

About the Robots.txt Generator

Robots.txt is a plain text file at the root of a domain that tells crawlers which parts of the site they should not request. The tool builds one from rules you pick, with a preview of the finished file and a check for the mistakes that make a robots.txt do the opposite of what its author intended.

Those mistakes are specific and common. Disallow with a single slash blocks the entire site, and one stray character is all it takes. Rules are matched by prefix, so disallowing /admin also blocks /administrator-notes. Blank lines inside a group end that group. And the file is only read at the root of the domain, so putting it in a subfolder achieves nothing.

The most important thing to understand is what robots.txt does not do. It stops well-behaved crawlers requesting a page; it does not stop that page appearing in search results if other sites link to it, and it does not keep anything private. A blocked page can still be indexed with no description. To keep a page out of an index, allow the crawl and use a noindex tag; to keep it private, use a login.

How to use the Robots.txt Generator

  1. Choose a preset or start blankPresets cover an open site, a WordPress install and a staging site.
  2. Add rules per crawlerSet a user-agent and the paths to allow or disallow.
  3. Add your sitemapA sitemap line helps crawlers find your URL list.
  4. Copy and uploadThe file belongs at the root of your domain, as /robots.txt.

Features

  • Per-crawler groups with allow and disallow rules
  • Presets for an open site, WordPress and staging
  • Sitemap references, including several
  • Optional crawl-delay with a note on which crawlers honour it
  • Warns when a rule would block the whole site
  • Explains that blocking is not the same as removing from an index
  • Copy or download the finished file

Who uses this tool

The robots.txt generator is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:

  • Setting up robots.txt for a new site
  • Keeping crawlers out of admin and search result pages
  • Blocking a staging site from being crawled
  • Adding a sitemap reference so crawlers find your URLs
  • Allowing one crawler while restricting others

Frequently asked questions

Does robots.txt keep a page out of search results?

No, and this is the most important misunderstanding about it. It asks crawlers not to request the page. If other sites link to that page, it can still be indexed, usually showing as a bare URL with no description. To keep a page out of an index, let it be crawled and add a noindex meta tag.

Is robots.txt a security measure?

Not at all. It is a public file that anyone can read, and it effectively advertises the paths you would rather people did not visit. Anything genuinely private needs authentication.

Where does the file go?

At the root of the domain, reachable at /robots.txt. It is only honoured there, and rules apply only to the host and protocol it was served from.

Do all crawlers obey it?

The major search engines do. Scrapers and malicious bots generally ignore it, because nothing enforces compliance. Crawl-delay in particular is honoured by some crawlers and ignored by others.

How are paths matched?

By prefix. Disallow: /admin blocks any path starting with those characters, which includes /administrator. The dollar sign anchors the end of a path and the asterisk is a wildcard, both of which the major crawlers support.

What happens if the file is missing?

Crawlers assume everything is allowed, which is usually fine for a normal site. A missing robots.txt is not an error.

If the robots.txt generator is not quite what you need, these other free tools solve closely related problems.

XML Sitemap Generator

Build sitemap.xml from your URL list, with lastmod, changefreq and priority.

SEO Tools Use tool

Canonical Tag Generator

Generate canonical link tags, with hreflang alternates and common-mistake checks.

SEO Tools Use tool

.htaccess Generator

Generate .htaccess rules for redirects, caching, compression and security headers.

SEO Tools Use tool

301 Redirect Generator

Generate redirect rules for Apache, nginx, Netlify, Vercel and Cloudflare from a mapping.

SEO Tools Use tool