One Click Answers

OCAInternet

Share tool
FacebookPinterestEmail

Robots.txt Generator

Choose what crawlers may visit. Get a robots.txt file you can copy or download.

About this tool & how to use it

What the Robots.txt Generator does

Writes a robots.txt file from plain choices: allow everything, block everything or block the paths you list, with your sitemap and an optional request to AI-training crawlers.

How to use the Robots.txt Generator

  1. Choose whether crawlers may visit everything, everything except some paths, or nothing.
  2. If you chose paths, list them one per line, each starting with a slash, such as /private/.
  3. Add your sitemap address if you have one, then copy or download the file and upload it as robots.txt at the top of your site.
What should crawlers be allowed to visit?

Up to 100 lines in each box. Names of AI crawlers change over time, and a crawler may ignore the request.

One click answer

Fill in the form and your answer will appear here.

Made in your browser. Nothing you type is sent anywhere or stored. This tool only writes the text: it never changes your website.

Related tools

Try another answer

How it works

A robots.txt file is a short text file at the top of a website that tells crawlers, such as search engine robots, which paths they are asked not to visit. Each group starts with a User-agent line that names the crawler (an asterisk means all of them) followed by Disallow lines for paths to stay out of and Allow lines for exceptions inside a blocked path. Sitemap lines tell crawlers where your sitemap is.

Everything you type is checked before it is written. A path must start with a slash and cannot contain spaces, a hash mark or a line break, so a mistake (or a pasted line break) cannot add a rule you did not mean. Sitemap addresses must be full http or https addresses.

The option to ask AI-training crawlers to stay away adds one block per named crawler. The names are the ones their operators publish, they change over time, and a crawler is free to ignore the request.

Assumptions

  • robots.txt is a request to well-behaved crawlers, not security. Blocked pages can still be opened by anyone who knows the address, and a blocked page can still appear in search results if other sites link to it. Use a password or a noindex tag for pages that must stay out.
  • Blocking everything asks search engines to stop listing your site. That is right for a private or unfinished site and a mistake for a site you want found.
  • The file only works when it is uploaded as robots.txt at the top of your site. This tool never changes your website.
  • Everything is made in your browser. Nothing you type is sent anywhere or stored.

Robots.txt Generator example

Input: Block /private/ and /tmp/, and add a sitemap

Result: User-agent: * Disallow: /private/ Disallow: /tmp/ Sitemap: https://example.com/sitemap.xml

Robots.txt Generator questions

Where do I put the file?

At the top of your site, so that it opens at your address followed by /robots.txt. Many website builders have a setting for it instead.

Will blocking a page remove it from Google?

Not reliably. Robots.txt asks crawlers not to visit a page. A page that other sites link to can still be listed. To keep a page out of results, use a noindex tag or a password.

How can I check the file after I upload it?

Run your site through the Robots.txt Checker. It reads the file the way a visitor would and explains it in plain English.

Last reviewed 2026-10-02. Report an incorrect result

Got another question?

Free, no account. Answers show how they were worked out.