← Back to TechDriven Tools
July 31, 2026 · 3 min read

What Is robots.txt, and How Do You Write One?

robots.txt is a small plain-text file at a site's root that tells well-behaved crawlers which parts of the site they're welcome to fetch. It's a request, not a lock — it doesn't hide or protect anything, it just asks compliant bots (Google, Bing, and similar) to stay out of the paths you list.

Steps

  1. Open Robots.txt Generator.
  2. Pick a preset — Allow all, Block all, or Custom (list specific paths to disallow).
  3. Optionally add your sitemap URL, then download robots.txt and place it at your site's root, exactly at yoursite.com/robots.txt.

The three rules that matter most

User-agent names which crawler a block of rules applies to — * means every crawler that doesn't have its own specific block. Disallow lists a path pattern to keep out (an empty Disallow: means nothing is blocked). Allow explicitly permits a path, mainly useful for carving out an exception inside an otherwise-disallowed folder. A Sitemap: line pointing to your sitemap's full URL is optional but genuinely useful — it's one of the few places a crawler reliably looks for it.

What robots.txt doesn't do

Ready to try it? Use Robots.txt Generator free, right in your browser — no upload, no account.

← More guides