CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Developer
How-to

How do I generate a robots.txt file for my website?

Short answer

Use a browser-based robots.txt generator to pick which crawlers may access which paths, then place the generated file at the root of your site as /robots.txt. The file is built locally in your browser, and pairing it with a sitemap line helps search engines find your pages.

The format is small but exact

A robots.txt is a plain text file of User-agent, Disallow and Allow lines, plus an optional Sitemap line pointing at your sitemap URL. It must live at the site root, /robots.txt, or crawlers will not find it. A generator keeps the syntax right, because a stray character in a Disallow rule can silently block more than you intended, including your whole site with a single slash.

It is a request, not a lock

robots.txt is advisory: reputable crawlers like Googlebot follow it, but nothing forces compliance, and the file itself is public. That means it is the wrong tool for hiding sensitive URLs, listing a secret admin path in robots.txt actually advertises it. Use it to manage crawl behavior, and use authentication for anything that must stay private.

Step by step

  1. Choose your rules. Pick which user agents may crawl and which paths to disallow.
  2. Generate the file. The tool assembles a correctly formatted robots.txt locally, add your sitemap URL too.
  3. Upload to your root. Place the file at https://yoursite.com/robots.txt and verify it loads.

Frequently asked questions

Where does robots.txt go?

At the root of the domain, so it is reachable at /robots.txt. Crawlers do not look for it anywhere else.

Does robots.txt block bad bots?

No. It is a voluntary standard. Well-behaved crawlers respect it, but it is not access control and the file is publicly readable.

Should I include a Sitemap line?

Yes. A Sitemap line pointing at your sitemap.xml helps search engines discover your pages faster.

Related answers