Control
Crawl access
Configure disallow, allow, and sitemap rules in one place.
Preparing your content
Robots.txt Generator
Generate a valid robots.txt file in seconds — control crawlers, include sitemaps, and improve website SEO for Google, Bing, and AI crawlers.
Control
Crawl access
Configure disallow, allow, and sitemap rules in one place.
Validate
Immediate feedback
See warnings and copy/download your robots.txt instantly.
Status
Ready to create
Complete the form to generate your file.
Format
robots.txt
Download or copy your file when finished.
Set rules, add crawlers, and include sitemap details.
A robots.txt file is a plain text file placed at the root of your domain (for example, https://yoursite.com/robots.txt) that tells search engine and AI crawlers which parts of your site they are allowed to access. It follows the Robots Exclusion Protocol — a voluntary standard that reputable crawlers such as Googlebot, Bingbot, ClaudeBot, GPTBot, and PerplexityBot generally respect, but it is not a security mechanism.
Important: robots.txt controls crawling, not indexing. A page can still appear in search results even when it is disallowed — use noindex meta tags or headers for that instead.
User-agent: * Disallow: /admin/ Disallow: /cart/ Allow: /admin/public/ Sitemap: https://yoursite.com/sitemap.xml
| Directive | Purpose | Example |
|---|---|---|
| User-agent | Which crawler the rule applies to | User-agent: Googlebot |
| Disallow | Path the crawler should not access | Disallow: /private/ |
| Allow | Exception to a Disallow rule | Allow: /private/press-kit/ |
| Sitemap | Points crawlers to your XML sitemap | Sitemap: https://yoursite.com/sitemap.xml |
| Crawl-delay | Requests a pause between crawls (not honored by Google) | Crawl-delay: 10 |
Disallow: /*.pdf$ blocks all PDF files.Disallow: /search$ blocks only /search.User-agent: * Disallow: /*?sort= Disallow: /*.json$
WordPress generates a virtual robots.txt by default. To customize it, either edit the physical file in your root directory if it exists, or use an SEO plugin such as Yoast or Rank Math.
User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php Disallow: /wp-includes/ Disallow: /?s= Sitemap: https://yoursite.com/sitemap_index.xml
Avoid blocking /wp-content/uploads/ because that hides your images from Google Image Search.
Since 2021, Shopify allows direct editing of a robots.txt.liquidtheme file for full control over crawl rules, letting you add custom disallow rules while keeping Shopify's default protections for cart, checkout, and account pages.
Robots.txt tells crawlers what not to crawl, while sitemap.xml tells them what to crawl and how it is structured. Always reference your sitemap inside robots.txt:
Sitemap: https://yoursite.com/sitemap.xml
If your sitemap contains URLs also blocked in robots.txt, crawlers will ignore those entries — a common and easily overlooked mistake.
| Bot | Company | User-agent token |
|---|---|---|
| GPTBot | OpenAI | GPTBot |
| OAI-SearchBot | OpenAI | OAI-SearchBot |
| ClaudeBot | Anthropic | ClaudeBot |
| PerplexityBot | Perplexity | PerplexityBot |
| CCBot | Common Crawl | CCBot |
Allow AI crawlers for visibility in AI answers:
User-agent: GPTBot Allow: / User-agent: ClaudeBot Allow: / User-agent: PerplexityBot Allow: /
Block AI training crawlers but keep search crawlers:
User-agent: GPTBot Disallow: / User-agent: CCBot Disallow: / User-agent: Googlebot Allow: /
Pair this with our LLMS.txt Generator for a structured, machine-readable alternative aimed specifically at LLMs.
Disallow: /folder-name/staging.yoursite.com needs its own robots.txt at staging.yoursite.com/robots.txt.<meta name="robots" content="noindex"> instead — and don't block that page in robots.txt, or Google cannot even see the noindex tag.This Google Search Console warning means Google found links to a blocked page and indexed the URL anyway without content. Fix it by either:
noindex tag instead, orDisallow: / accidentally on a live production siteSitemap: directive/Folder/ versus /folder/Is robots.txt required?
No, but without one, crawlers assume full access to your entire site.
Does robots.txt block indexing?
No — it blocks crawling. Indexing is controlled separately with noindex tags.
Can I have multiple sitemaps in robots.txt?
Yes, add one Sitemap: line per sitemap file.
Do all AI bots respect robots.txt?
Reputable ones such as GPTBot, ClaudeBot, PerplexityBot, and CCBot do. It is a voluntary standard, not an enforced block.
Explore more tools