TontonTools

Robots.txt Generator

Generate a correct robots.txt in seconds — with copy-paste examples.

100% Free No signup Privacy-friendly SEO Tools
Updated Sep 2026
Share X / Twitter Facebook LinkedIn WhatsApp

How to use Robots.txt Generator

  1. Choose the default policy — “Allow all” for live sites, “Disallow all” only for staging/private sites.
  2. List paths to block, one per line: /admin/, /cart/, /search — each becomes a Disallow rule.
  3. Paste your sitemap URL (e.g. https://yoursite.com/sitemap.xml) so crawlers find every page.
  4. Copy the generated file and upload it to your site root as robots.txt, then test it with Google Search Console's robots.txt report.

What is Robots.txt Generator?

A robots.txt generator builds the small text file that tells search-engine crawlers which parts of your site they may visit. The file lives at your domain root (example.com/robots.txt) and uses a simple directive syntax. The standard example most sites need:

User-agent: *
Allow: /
Disallow: /admin/
Sitemap: https://example.com/sitemap.xml

That says: all crawlers (*) may crawl everything except /admin/, and here is the sitemap. Get the syntax slightly wrong, though — a stray Disallow: / is the classic disaster — and you can de-index an entire site. Generating the file beats hand-typing it.

About the Robots.txt Generator

Pick your default policy (allow all or disallow all), list any paths to block — one per line, like /admin/ or /cart/ — add your sitemap URL, and the correct robots.txt appears ready to copy.

Common robots.txt examples this covers: the standard site (allow everything, block admin and checkout paths, declare the sitemap); the staging site (Disallow: / to keep test versions out of Google — just remember to remove it at launch); and WordPress-style setups (block /wp-admin/ while leaving content crawlable). Upload the result to your site root as robots.txt — it must be at the top level, not in a subfolder.

One boundary worth knowing: robots.txt controls crawling, not indexing — a blocked URL can still appear in results if other sites link to it. To keep a page out of Google entirely, use a noindex meta tag on a crawlable page. And robots.txt is public (anyone can read yours), so never list secret paths in it.

Frequently Asked Questions

User-agent: * / Allow: / / Disallow: /admin/ / Sitemap: https://example.com/sitemap.xml — allow everything, block the private area, declare the sitemap. Most sites need nothing more.
At the domain root: https://example.com/robots.txt. Crawlers only look there — a robots.txt inside a subfolder is ignored. On most hosts that means the public web root (public_html or public).
Blocks the entire site from crawling — every URL. Correct for staging environments, catastrophic on a live site: rankings evaporate as pages drop from the index. Double-check this line before uploading.
Not reliably — it stops crawling, but a URL blocked by robots.txt can still be indexed from external links (shown without a description). To truly exclude a page, allow crawling and add a noindex meta tag instead.
Usually no — User-agent: * covers all well-behaved crawlers. Add specific groups only for different rules per bot, e.g. blocking GPTBot or other AI crawlers while allowing Googlebot.

Learn more

How to Write a robots.txt File (With Examples)

robots.txt controls what search engines crawl. Get it wrong and you can hide your whole site. Here is how to write one correctly, with examples.

Read the guide

We use cookies for analytics and to keep the tools free via ads. See our Privacy Policy.