Robots.txt Generator

Build a correct robots.txt file in a minute: pick the user-agent, add allow and disallow rules, include your sitemap URL, then copy the file or download it. It runs entirely in your browser.

Runs in your browser — your code and data never leave this device

How do I create a robots.txt file?

Set a user-agent, add your Allow and Disallow rules, include your sitemap URL, and copy or download the finished file. This free online robots.txt generator builds the file in your browser — no sign-up, no upload — and you can add a crawl-delay too, which Bing and Yandex respect (Google ignores it).

This tool writes the robots.txt text for you. It does not check a live site: upload the file to your site root (example.com/robots.txt) and test it in Google Search Console before you rely on it.

Related tools

How to use the Robots.txt Generator

  1. Leave the user-agent as * to address all crawlers, or type a specific one such as Googlebot.
  2. Add a rule for each path: Disallow to block a folder or page, Allow to make an exception inside a blocked folder.
  3. Add your sitemap URL if you have one, and a crawl-delay only if a crawler is hitting your server too hard.
  4. Click Generate robots.txt, then copy the text or download the file and upload it to your site root.

For the full picture — when to use robots.txt, what to block, and the mistakes that hide your site from Google — read our guide: How to Create a Robots.txt File (Free, in 2 Minutes).

What robots.txt actually does

A robots.txt file is a set of instructions for search engine crawlers. It lives at the root of a website, at example.com/robots.txt, and crawlers read it before they fetch anything else. The file says which parts of the site a crawler may visit and which parts it should leave alone, using simple rules: a user-agent line names the crawler, and Disallow and Allow lines name the paths.

The important thing to understand is that robots.txt is a request, not a lock. Major search engines honour it, and well-behaved crawlers do too, but nothing in the file physically stops anyone from opening a URL. A page blocked in robots.txt can still be visited by a person, linked from another site, and even indexed if Google finds enough links to it. For anything that must stay private, use a password or a noindex tag instead.

The rules, in plain language

User-agent: * addresses every crawler at once, which is what most small sites want. A specific agent such as Googlebot or Bingbot lets you write different rules for different crawlers. Disallow: /admin/ blocks everything under that folder, while Allow: /admin/public/ carves an exception back out of it. Rules are matched from the start of the path, so Disallow: /private blocks /private.html as well as /private/page.

Two optional lines round the file out. Sitemap: followed by your sitemap URL tells crawlers where to find the full list of your pages, which is useful even though you can also submit the sitemap in Search Console. Crawl-delay: 10 asks crawlers to wait ten seconds between requests, but be aware that Google ignores crawl-delay entirely; Bing and Yandex respect it. If Googlebot is overloading your server, the fix is in Search Console settings, not in this file.

Common mistakes to avoid

The most damaging mistake is a single wrong slash: Disallow: / blocks the entire site, and it has taken down more than one launch when a staging file was copied to production by accident. Always read the generated file once before uploading it, and check in Search Console that your important pages are still reachable. The second mistake is blocking CSS and JavaScript files: Google needs those to render a page, and blocking them can make a good page look broken to the crawler.

The third mistake is treating robots.txt as a privacy tool. A disallowed admin page, staging site or private document is still public if someone knows the address, and the robots.txt file itself advertises the paths you blocked, since anyone can read it. Keep sensitive content behind a login, and use a noindex meta tag on pages you want crawled but not shown in search results.

Allow, Disallow and a sitemap line: what goes in the file

To create a robots.txt file online free, start with the user-agent the rules apply to — a star means every crawler — then add Disallow lines for the paths search engines should skip, such as admin pages or internal search results, and Allow lines for the exceptions. The sitemap line at the end points crawlers to your sitemap, so they find your pages faster; it is the one line almost every robots.txt file should have.

One rule of thumb before you publish: a robots.txt file tells well-behaved crawlers where not to go, but it is not access control — anyone can read the file and visit a disallowed path anyway, so never use it to hide private content. Keep the file simple, test it after uploading (this tool builds the file; it does not check a live one), and remember that a single wrong Disallow can hide your whole site from search, so read the file once before it goes live.

Frequently asked questions

Where does robots.txt go?

At the root of your domain, so it is reachable at example.com/robots.txt. A copy in a subfolder does nothing: crawlers only check the root.

Does robots.txt hide a page from Google?

No. It tells crawlers not to fetch the page, but Google may still index the URL if other pages link to it. To keep a page out of search results, use a noindex meta tag on the page itself.

What does Disallow: / do?

It blocks the whole site from the named crawler. It is useful on a staging site you never want indexed, and a disaster on a live site, so check the file before uploading.

Does Google follow crawl-delay?

No, Google ignores the crawl-delay directive. Bing and Yandex respect it. If Googlebot is crawling too aggressively, adjust the crawl rate in Google Search Console instead.

Is my data uploaded anywhere?

No. This tool runs entirely in your browser using JavaScript. Nothing you type is uploaded, stored or sent anywhere.

What is a robots.txt file?

A small text file that sits at the root of a website and tells search-engine crawlers which pages they may visit and which they should skip. It uses Allow and Disallow rules, grouped by user-agent, and usually ends with a link to the site's sitemap.

What does crawl-delay do?

It asks crawlers to wait a set number of seconds between requests, which can ease the load on a small server. Bing and Yandex respect it, but Google ignores crawl-delay — for Google, request rate is managed in Search Console instead.

Where do I put the robots.txt file?

At the root of your domain, so it is reachable at yoursite.com/robots.txt. A copy in a subfolder does not work — crawlers only look at the root. Upload the file there after downloading it from this generator.