1. Home
  2. Tools
  3. robots.txt Generator

robots.txt Generator

Build a robots.txt file with rules for different crawlers, sitemap links and quick presets, then copy or download it. It runs in your browser.

robots.txt is not a way to hide private content. It is a public file that politely asks well-behaved crawlers to skip certain paths. Anyone can read it, and it can even point people to the paths you list. Protect private pages with a login or server rules, not with robots.txt.
Start from a preset

A preset replaces the groups below. Blocking everything also asks search engines not to crawl your site, so use it for staging or private sites, not live ones you want found.

Your input is processed in your browser and is not sent anywhere. Upload the file to the top level of your site so that it is reachable at /robots.txt.

How to use it

  1. Pick a preset, or edit the first group. A group applies to the crawlers named in its User-agent box: use * for all crawlers, or a crawler’s name, such as Googlebot. Put several names on one line separated by commas to share the rules.
  2. Add the paths to disallow (crawlers should skip) and allow (exceptions inside a disallowed folder), one per line. Paths start with /; a trailing slash means a folder.
  3. Add your sitemap addresses, one per line. They must be full URLs.
  4. Press Copy or Download robots.txt, and upload the file to the root of your site.

What robots.txt does

Before crawling a site, well-behaved crawlers such as those of search engines request /robots.txt and follow the rules for their name. Each rule group starts with one or more User-agent lines followed by Disallow and Allow lines. An empty Disallow: allows everything, and Disallow: / blocks the whole site. Crawlers generally apply the most specific matching rule, but the details differ a little between crawlers, so test important rules with the tools your search engines provide.

What it does not do

Robots.txt controls crawling, not access and not indexing. A blocked page can still appear in search results as a bare address if other sites link to it, and the file itself is public. Badly behaved bots ignore it. To keep a page out of search results, use a noindex directive (see the meta tag generator) on a page that is allowed to be crawled, and to keep content private, require a login.

Crawl-delay

The optional Crawl-delay line asks a crawler to wait a number of seconds between requests. It is not honoured by every crawler, and some major search engines ignore it. It is only written when you fill it in.

Related guides

More SEO and marketing tools: meta and Open Graph tag generator, search snippet preview and UTM link builder. For help with SEO, see our marketing expertise.

Frequently asked questions

No. The file is written by your browser’s own JavaScript and downloaded from your own device. Nothing is sent to CodeROG or anyone else.

No. The file is public and only asks crawlers to behave. Listing a private path in it can even reveal that the path exists. Use authentication to protect content.

At the root of the host it applies to, so that it loads at https://your-site.example/robots.txt. A file in a sub-folder is not read, and each subdomain needs its own.

It is not part of the original standard, and crawlers treat it differently: some obey it, some ignore it. If a crawler is overloading your server, use the controls that crawler’s operator provides or limit it at the server.

Not reliably. A blocked page can still be listed without a description if it is linked from elsewhere. Use noindex on a crawlable page to ask for removal from results.

Need a hand with this?

Let our engineers take it from here