ToolNest logoToolNest.

Free Online Robots.txt Generator

Last updated: 2026-10-17

Quick answer: Control how search engines crawl your site. Our free robots.txt generator builds a valid robots.txt file rule by rule — allow or block specific paths, target individual user-agents like Googlebot, add a crawl-delay, and point to your sitemap. Copy the result or download it, then upload it to your domain root. No signup, everything runs in your browser.

🔒 100% Private: Data never leaves your device.
User-agentDirectivePath
Upload the file to your domain root as /robots.txt (e.g. example.com/robots.txt), then test it in Google Search Console's robots.txt report.

✓ Free forever  ·  ✓ No signup  ·  ✓ Tool inputs stay in your browser — never sent to our servers.

Try next: Sitemap Generator · Meta Tag Generator · Keyword Density Checker

How to Use the Robots.txt Generator

  1. Enter your site URL so the Sitemap line can be built correctly, then pick a preset or build rules manually.
  2. Add one rule per row: the user-agent it applies to (* = all crawlers), Allow or Disallow, and the path.
  3. Optionally add your sitemap URL and a crawl-delay for bots that request one politely.
  4. Click Copy or Download, then upload the file to your domain root as /robots.txt.
  5. Test it in Google Search Console (Settings → robots.txt) and re-check it any time you restructure your site.

Why Use Our Robots.txt Generator?

Common Use Cases

Robots.txt Generator vs Alternatives

If you're on WordPress with Yoast or RankMath, generating inside the plugin keeps everything in one place. For every other stack — static sites, custom backends, or anyone who wants the file built and downloaded in under a minute — this generator is the faster, no-signup path, and Search Console remains the final word on validation.

Frequently Asked Questions

What is a robots.txt file?
A plain-text file at your domain root (example.com/robots.txt) that tells search-engine crawlers which parts of your site they may or may not crawl. It's a request, not enforcement — well-behaved bots like Googlebot honor it.
Where do I put my robots.txt file?
At the root of your domain — https://example.com/robots.txt. Bots only check that one location, so a robots.txt in a subfolder (example.com/blog/robots.txt) is ignored.
Does blocking a page in robots.txt remove it from Google?
No — and this trips people up. A Disallow stops crawling, but Google can still index a URL it discovers via links, sometimes showing it without a description. To truly keep a page out of results, use a noindex tag or password protection instead.
What is crawl-delay and should I use it?
Crawl-delay: 10 asks polite bots to wait 10 seconds between requests. Googlebot ignores it (set crawl rate in Search Console instead), but some smaller crawlers honor it. Leave it blank unless a bot is hammering your server.
What's the difference between Allow and Disallow?
Disallow: /private/ blocks that path; Allow: /private/public/ re-permits a sub-path inside a blocked one. Rules are matched in order of specificity — the most specific matching rule wins.
How do I block AI crawlers like GPTBot?
Use the 'Block AI crawlers' preset or add rules with User-agent: GPTBot, CCBot, anthropic-ai, and PerplexityBot set to Disallow: /. It only works on crawlers that identify themselves honestly, but the major ones do.
How do I test my robots.txt?
Paste the live URL into Google Search Console under Settings → robots.txt — it validates syntax and shows what Googlebot can fetch. Fix any warnings there before relying on the file.
Do I actually need a robots.txt file?
Most small sites don't — with no robots.txt, crawlers simply crawl everything, which is fine. You need one when there's something to control: a staging subdomain, admin/login paths, thin internal search pages, aggressive AI scrapers, or crawl-budget pressure on a large site. If none of those apply, skipping the file entirely is a valid choice.
Can a robots.txt mistake remove my whole site from Google?
Yes — and it's one of the most common SEO disasters. A stray 'Disallow: /' (often copied from a staging environment) tells every crawler to leave, and rankings collapse within days. Always test in Search Console after deploying, and never copy a staging robots.txt to production without checking it. The 'Allow everything' preset above generates the safe default.
What is the Sitemap: line in robots.txt for?
A discovery hint: 'Sitemap: https://example.com/sitemap.xml' tells crawlers where your sitemap lives without them having to guess or wait for a Search Console submission. Google honors it as a suggestion, not a command — it doesn't replace submitting the sitemap in Search Console, but it helps smaller crawlers that never visit Search Console at all.
How long does it take Google to respect robots.txt changes?
Usually within a day — Googlebot re-fetches robots.txt frequently (roughly every 24 hours for active sites). You can speed it up in Search Console's robots.txt report, which re-validates on demand. Note the direction matters: newly Disallow-ed pages stop being crawled quickly, but URLs already indexed can linger in results for weeks.
Should I block /wp-admin/ and /wp-login.php in robots.txt?
Blocking /wp-admin/ is standard WordPress hygiene — there's nothing there worth crawling, and it trims bot traffic. Don't rely on it for security, though: robots.txt is a public file, so listing /wp-login.php advertises the login page to attackers. Real protection is rate-limiting, 2FA, and keeping WordPress updated.
Does robots.txt affect my SEO rankings?
Not directly — robots.txt is not a ranking factor. The effect is indirect and real: on large sites, blocking low-value pages (filters, internal search, archives) concentrates Google's crawl budget on the pages that matter, which can improve how thoroughly and quickly important pages get indexed. On a small site, the file is neutral.