Robots.txt Generator

Build perfect robots.txt files for any website.

ALLOW / DISALLOW USER-AGENT TARGETING PRESETS 100% FREE
Free Professional Tool | No Registration Required | Updated: January 2026
AI-GENERATED TOOL

Note: This Robots.txt Generator was created with the help of AI. All rules are built client-side from the options you select — nothing is uploaded, no APIs, no tracking. Remember: robots.txt is a directive, not a security mechanism. It requests crawlers stay out, but malicious bots can ignore it. Never rely on robots.txt to protect sensitive data — use authentication for that.

Tell Crawlers What to Index

Control Googlebot, Bingbot, AI crawlers and any other bot — with valid, compliant rules.

Validator Built-in Presets 100% Private

Global Rules (apply to all crawlers)

Global Directives

Per-Bot Rules

Leave blank to omit

Sitemap & Extras

Used for display only. Your robots.txt will be served at https://example.com/robots.txt

robots.txt

0 rules
# Your robots.txt will appear here as you build.

Where to Place It

Upload robots.txt to the root directory of your website. It must be accessible at https://yourdomain.com/robots.txt.

Ready-to-Use Presets

Click any preset to load it into the builder, then customise as needed.

Validate robots.txt

Paste any robots.txt content to check for syntax errors, common mistakes and best-practice violations.

Report

Paste content and click Validate to see the report.

Robots.txt Reference

Directives

DirectivePurpose
User-agentWhich crawler the rules apply to. Use * for all.
DisallowBlock access to a path or directory.
AllowExplicitly permit a path (overrides Disallow when more specific).
SitemapAbsolute URL of your XML sitemap. Can appear multiple times.
Crawl-delaySeconds between requests (Yandex and Bing respect it; Google ignores it).
HostPreferred domain (Yandex only).

Wildcards & Patterns

PatternMeaningExample
/path/Matches any URL starting with /path/Disallow: /admin/
*Any sequence of characters (wildcard)Disallow: /*.pdf$
$End of URL matchDisallow: /*.php$
Allow: /public/Explicitly allow (overrides parent Disallow)Allow specific subpaths

Common Bots To Know

User-AgentOperatorNotes
GooglebotGoogleSearch results
Googlebot-ImageGoogleGoogle Images
Googlebot-NewsGoogleGoogle News
BingbotMicrosoftBing search
GPTBotOpenAITraining data collection for ChatGPT
ChatGPT-UserOpenAIUser-triggered ChatGPT browsing
ClaudeBotAnthropicClaude training/browsing
PerplexityBotPerplexitySearch + citation
CCBotCommon CrawlOpen dataset used by many LLMs
AhrefsBotAhrefsSEO backlink data
SemrushBotSemrushSEO data
MJ12botMajesticBacklink data
facebookexternalhitMetaFacebook link previews
TwitterbotXTwitter card previews
LinkedInBotLinkedInLinkedIn link previews
ia_archiverInternet ArchiveWayback Machine

Important Notes

  • • robots.txt is a request, not enforcement. Well-behaved bots follow it; malicious ones ignore it.
  • • Blocking a page doesn't remove it from search results. Google needs to crawl the page to see a noindex tag. Use noindex meta tags instead.
  • • Blocking CSS/JS breaks rendering. If you block /assets/, Google can't render your page properly.
  • • Case-sensitive paths. /Admin/ and /admin/ are different.
  • • First match wins per bot. The most specific rule (longest path) wins between Allow and Disallow.
  • • Trailing slash matters. /blog/ blocks the directory; /blog blocks the path and its children.
  • • Only one robots.txt per domain. Subdomains need their own.

Complete robots.txt Guide

What Is robots.txt?

robots.txt is a plain-text file placed at the root of a website (e.g. https://example.com/robots.txt) that tells well-behaved crawlers which parts of the site they should and shouldn't visit. It follows the Robots Exclusion Protocol, first proposed in 1994 and standardised in RFC 9309 in 2022.

It is not a security mechanism. It is a request. Malicious crawlers ignore it, and so do some scrapers. For actual access control, use authentication, IP allowlists, or HTTP 401 responses.

Basic Structure

User-agent: *
Disallow: /admin/
Disallow: /private/
Allow: /admin/public/

Sitemap: https://example.com/sitemap.xml

Each rule has a User-agent line followed by one or more Allow / Disallow lines. Rules for a bot apply until the next User-agent line.

Allow vs Disallow

  • Disallow: /path/ blocks all URLs starting with /path/.
  • Disallow: / blocks the entire site.
  • Disallow: (empty) — an empty value means "allow everything". Useful after a specific Disallow to reset access.
  • Allow: /path/ explicitly permits a path. When multiple rules match, the longest match wins.

Wildcards: * and $

Google and Bing support two wildcard characters:

  • * — matches any sequence of characters
  • $ — marks the end of the URL

Examples:

Disallow: /*.pdf$     # block all PDFs
Disallow: /*?session= # block URLs with a session parameter
Disallow: /search     # block /search and everything under it
Disallow: /search$    # block only /search, not /search/foo

What robots.txt Can and Cannot Do

CanCannot
Ask well-behaved crawlers not to visit pathsEnforce access control
Point crawlers to your sitemapRemove pages from search results
Set crawl delay for some botsControl indexing of a page directly (use noindex)
Block entire sections you don't want indexedStop scrapers, competitors, or AI trainers who ignore it
Block malicious or unknown crawlers by nameProtect sensitive data

Common Mistakes

  1. Using Disallow to remove a page from Google. Google needs to crawl a page to see its noindex tag. If you block it with robots.txt, the page may stay indexed without content. Use noindex instead, then optionally block after Google removes it.
  2. Blocking CSS and JS. Google needs to render pages. Blocking /assets/, /static/, /_next/ or your CDN breaks the mobile-friendly test and rich results.
  3. Forgetting case sensitivity. /Admin/ and /admin/ are different paths.
  4. Blocking the sitemap itself. Never disallow your sitemap URL.
  5. Using robots.txt for security. Sensitive paths need server-side protection, not a request to crawlers.
  6. Ignoring subdomains. Each subdomain needs its own robots.txt.
  7. Blocking the wrong AI crawler. There are dozens of AI crawlers with distinct user-agents. Blocking GPTBot alone won't stop Google-Extended, ClaudeBot, PerplexityBot, CCBot, etc.

AI Crawlers in 2026

Many website owners now want to control whether their content trains or feeds AI models. Relevant user-agents:

  • GPTBot — OpenAI's training crawler
  • ChatGPT-User — User-triggered browsing by ChatGPT
  • OAI-SearchBot — OpenAI search index
  • ClaudeBot — Anthropic
  • Google-Extended — Google's AI training (does not affect Search)
  • PerplexityBot — Perplexity AI
  • CCBot — Common Crawl, used by many LLMs
  • Bytespider — ByteDance (TikTok)
  • Applebot-Extended — Apple Intelligence
  • Meta-ExternalAgent — Meta AI

To block all AI training while keeping search:

User-agent: GPTBot
Disallow: /

User-agent: ChatGPT-User
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: PerplexityBot
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: Bytespider
Disallow: /

How to Use This Generator

  1. Builder tab: Set global rules, add per-bot rules, configure sitemaps. Watch the output update live.
  2. Presets tab: Start from a preset — WordPress, E-commerce, Block AI crawlers, Allow all, etc.
  3. Validate tab: Paste an existing robots.txt to check syntax and best practices.
  4. Copy or download the result and upload to your site's root directory.
  5. Verify it works: visit https://yourdomain.com/robots.txt and use Google's robots.txt Tester (in Search Console).

Pro Tip: If you're unsure whether a rule blocks the right paths, use Google Search Console → robots.txt Tester (still available via URL Inspection → Test Live URL). It shows you exactly which URLs are allowed or blocked for Googlebot.

⚠️ AI-Generated Tool Notice: This robots.txt Generator was built with AI assistance. Crawler behavior evolves and some bots may ignore directives. Always test on a staging environment, verify with Search Console and Bing Webmaster Tools, and treat robots.txt as advisory, not as a security boundary.

Frequently Asked Questions

No. Blocking a page in robots.txt prevents Google from crawling it, but if Google has already indexed the URL, it can remain in search results (often shown without a snippet). To actually remove a page from Google, either (1) add a <meta name="robots" content="noindex"> tag and let Google re-crawl it, or (2) use the Removals tool in Search Console for temporary removal. If you block with robots.txt, Google can't see the noindex tag — so don't combine them the wrong way.

Disallow: /path blocks /path AND everything under it (/path/, /path/foo, /pathology — yes, literally). Disallow: /path/ blocks only URLs that begin with /path/, so /pathology is allowed. Best practice: use trailing slashes on directory paths to avoid accidentally blocking similarly-named pages.

No. Google officially ignores the Crawl-delay directive. Bing and Yandex do honour it. If you want to slow Google down, use the Crawl rate setting in Google Search Console instead. Including crawl-delay in your robots.txt is harmless — other crawlers may respect it.

Use specific user-agents. Google's AI training crawler is Google-Extended — blocking it does not affect Googlebot (search). Block GPTBot, ClaudeBot, PerplexityBot, CCBot, Bytespider, Applebot-Extended and others individually. The Builder tab includes a preset for this. Note: blocking doesn't guarantee compliance — some crawlers ignore robots.txt. Consider also rate-limiting or blocking at the server level.

No — never block CSS or JS. Googlebot needs these resources to render pages properly. Blocking them can cause Google to see broken layouts, miss mobile-friendliness, break JavaScript-loaded content, and fail rich-result validation. Search Console will flag blocked resources as warnings. Keep /static/, /assets/, /_next/, and CDN paths allowed.

Always at the root of the domain: https://yourdomain.com/robots.txt. Not in a subdirectory. If you use a subdomain (like blog.example.com), that subdomain needs its own robots.txt. The file must return HTTP 200 with content type text/plain. If it returns 404, crawlers assume "allow everything."

Ready to Control Your Crawlers?

Build, validate and deploy a complete robots.txt file in seconds — no registration, no server required.

Updated: January 2026 | Free for Commercial Use | 100% Client-Side Processing

Why Choose Our Robots.txt Generator?

Full Directive Support

User-agent, Allow, Disallow, Sitemap, Crawl-delay, Host — every valid directive covered.

Smart Presets

WordPress, e-commerce, block AI crawlers, allow-all, block-all — one click to start.

Built-in Validator

Paste any robots.txt to detect syntax errors, common mistakes and best-practice issues.

100% Private

Everything runs locally. Your rules never leave your browser.

More SEO Tools