Robots txt skill

When the user wants to configure, audit, or optimize robots.txt.

by kostja94·MIT license·★ 1,006 Stars on the repo·GitHub ↗

Use now

Files of Robots txt

kostja94/main1 file shown
SKILL.md
Show the full text142 lines

SEO Technical: robots.txt

Guides configuration and auditing of robots.txt for search engine and AI crawler control.

When invoking: On first use, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.

Scope (Technical SEO)

  • Robots.txt: Configure Disallow/Allow, Sitemap, Clean-param; audit for accidental blocks
  • Crawler access: Path-level crawl control; AI crawler allow/block strategy
  • Differentiation: robots.txt = crawl control (who accesses what paths); noindex = index control (what gets indexed). See indexing for page-level exclusions.

Initial Assessment

Project context: Read root contextus.md when present and load only the modules relevant to this task. Without Contextus, use available project material or user-provided facts and ask for missing information; do not create a parallel context system.

Identify:

  1. Site URL: Base domain (e.g., https://example.com)
  2. Indexing scope: Full site, partial, or specific paths to exclude
  3. AI crawler strategy: Allow search/indexing vs. block training data crawlers

Best Practices

Purpose and Limitations
Point Note
Purpose Controls crawler access; does NOT prevent indexing (disallowed URLs may still appear in search without snippet)
Advisory Rules are advisory; malicious crawlers may ignore
Public robots.txt is publicly readable; use noindex or auth for sensitive content. See indexing
Tool Controls Prevents indexing?
robots.txt Crawl (path-level) No—blocked URLs may still appear in SERP
noindex (meta / X-Robots-Tag) Index (page-level) Yes. See indexing
nofollow Link equity only No—does not control indexing
When to Use robots.txt vs noindex
Use Tool Example
Path-level (whole directory) robots.txt Disallow: /admin/, Disallow: /api/, Disallow: /staging/
Page-level (specific pages) noindex meta / X-Robots-Tag Login, signup, thank-you, 404, legal. See indexing for full list
Critical Do NOT block in robots.txt Pages that use noindex—crawlers must access the page to read the directive

Paths to block in robots.txt: /admin/, /api/, /staging/, temp files. Paths to use noindex (allow crawl): /login/, /signup/, /thank-you/, etc.—see indexing.

Location and Format
Item Requirement
Path Site root: https://example.com/robots.txt
Encoding UTF-8 plain text
Standard RFC 9309 (Robots Exclusion Protocol)
Core Directives
Directive Purpose Example
User-agent: Target crawler User-agent: Googlebot, User-agent: *
Disallow: Block path prefix Disallow: /admin/
Allow: Allow path (can override Disallow) Allow: /public/
Sitemap: Declare sitemap absolute URL Sitemap: https://example.com/sitemap.xml
Clean-param: Strip query params (Yandex) See below
Path Format Rules (Critical)

Different directives use different path formats — a common source of errors:

Directive Format Correct Wrong
Disallow / Allow Root-relative path only (starts with /) Disallow: /admin/ Disallow: https://example.com/admin/
Sitemap Absolute URL only Sitemap: https://example.com/sitemap.xml Sitemap: /sitemap.xml

Wildcards: * matches any character sequence (Disallow: /tmp/*). $ marks exact URL ending (Allow: /news/.html$).

Priority: More specific paths take precedence. Allow: /shop/shoes/ overrides Disallow: /shop/. Path matching is case-sensitive: Disallow: /PDF/ does not match /pdf/.

Critical: Do Not Block
Do not block Reason
CSS, JS, images Google needs them to render pages; blocking breaks indexing
/_next/ (Next.js) Breaks CSS/JS loading; static assets in GSC "Crawled - not indexed" is expected. See indexing
Pages that use noindex Crawlers must access the page to read the noindex directive; blocking in robots.txt prevents that

Only block: paths that don't need crawling: /admin/, /api/, /staging/, temp files.

AI Crawler Strategy

robots.txt is effective for all measured AI crawlers. Set rules per user-agent; check each vendor's docs for current tokens.

User-agent Purpose Typical Notes
OAI-SearchBot ChatGPT search Allow Respects robots.txt
GPTBot OpenAI training Disallow Respects robots.txt; shares crawl data with OAI-SearchBot if both allowed
ChatGPT-User User-initiated browsing N/A No longer respects robots.txt (Dec 2025); use server-side controls instead
Claude-SearchBot Claude search Allow Respects robots.txt
Claude-User Anthropic user-initiated browsing Allow Respects robots.txt (unlike ChatGPT-User)
ClaudeBot Anthropic training Disallow Respects robots.txt

Deprecated: anthropic-ai — retired by Anthropic, replaced by ClaudeBot / Claude-User / Claude-SearchBot. References to anthropic-ai in robots.txt have no effect. | PerplexityBot | Perplexity search | Allow | Respects robots.txt | | Google-Extended | Gemini training | Disallow | Respects robots.txt | | CCBot | Common Crawl (LLM training) | Disallow | Respects robots.txt | | Bytespider | ByteDance | Disallow | Respects robots.txt | | Meta-ExternalAgent | Meta | Disallow | Respects robots.txt | | AppleBot | Apple (Siri, Spotlight); renders JS | Allow for indexing | Respects robots.txt |

Allow vs Disallow: Allow search/indexing bots (OAI-SearchBot, Claude-SearchBot, PerplexityBot); Disallow training-only bots (GPTBot, ClaudeBot, CCBot) if you don't want content used for model training.

Important — ChatGPT-User exemption: As of December 2025, ChatGPT-User no longer respects robots.txt directives. OpenAI considers it a proxy for human-initiated browsing. If you need to block it, use server-side controls (WAF rules, IP rate-limiting), not robots.txt. See site-crawlability for AI crawler optimization (SSR, URL management).

Clean-param (Yandex)
Clean-param: utm_source&utm_medium&utm_campaign&utm_term&utm_content&ref&fbclid&gclid

Output Format

  • Current state (if auditing)
  • Recommended robots.txt (full file)
  • Compliance checklist
  • References: Google robots.txt
  • indexing: Full noindex page-type list; when to use noindex vs robots.txt; GSC indexing diagnosis
  • page-metadata: Meta robots (noindex, nofollow) implementation
  • xml-sitemap: Sitemap URL to reference in robots.txt
  • site-crawlability: Broader crawl and structure guidance; AI crawler optimization
  • rendering-strategies: SSR, SSG, CSR; content in initial HTML for crawlers
1---
2name: robots-txt
3description: When the user wants to configure, audit, or optimize robots.txt. Also use when the user mentions "robots.txt," "crawler rules," "block crawlers," "AI crawlers," "GPTBot," "allow/disallow," "disallow path," "crawl directives," "user-agent," "block Googlebot," "fix robots.txt," "robots.txt blocking," or "search engine crawling." For indexing, use indexing.
4metadata:
5 version: 1.2.0
6---
7 
8# SEO Technical: robots.txt
9 
10Guides configuration and auditing of robots.txt for search engine and AI crawler control.
11 
12**When invoking**: On **first use**, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On **subsequent use** or when the user asks to skip, go directly to the main output.
13 
14## Scope (Technical SEO)
15 
16- **Robots.txt**: Configure Disallow/Allow, Sitemap, Clean-param; audit for accidental blocks
17- **Crawler access**: Path-level crawl control; AI crawler allow/block strategy
18- **Differentiation**: robots.txt = crawl control (who accesses what paths); noindex = index control (what gets indexed). See **indexing** for page-level exclusions.
19 
20## Initial Assessment
21 
22**Project context:** Read root `contextus.md` when present and load only the modules relevant to this task. Without Contextus, use available project material or user-provided facts and ask for missing information; do not create a parallel context system.
23 
24Identify:
251. **Site URL**: Base domain (e.g., `https://example.com`)
262. **Indexing scope**: Full site, partial, or specific paths to exclude
273. **AI crawler strategy**: Allow search/indexing vs. block training data crawlers
28 
29## Best Practices
30 
31### Purpose and Limitations
32 
33| Point | Note |
34|-------|------|
35| **Purpose** | Controls crawler access; does NOT prevent indexing (disallowed URLs may still appear in search without snippet) |
36| **Advisory** | Rules are advisory; malicious crawlers may ignore |
37| **Public** | robots.txt is publicly readable; use noindex or auth for sensitive content. See **indexing** |
38 
39### Crawl vs Index vs Link Equity (Quick Reference)
40 
41| Tool | Controls | Prevents indexing? |
42|------|----------|-------------------|
43| **robots.txt** | Crawl (path-level) | No—blocked URLs may still appear in SERP |
44| **noindex** (meta / X-Robots-Tag) | Index (page-level) | Yes. See **indexing** |
45| **nofollow** | Link equity only | No—does not control indexing |
46 
47### When to Use robots.txt vs noindex
48 
49| Use | Tool | Example |
50|-----|------|---------|
51| **Path-level** (whole directory) | robots.txt | `Disallow: /admin/`, `Disallow: /api/`, `Disallow: /staging/` |
52| **Page-level** (specific pages) | noindex meta / X-Robots-Tag | Login, signup, thank-you, 404, legal. See **indexing** for full list |
53| **Critical** | Do NOT block in robots.txt | Pages that use noindex—crawlers must access the page to read the directive |
54 
55**Paths to block in robots.txt**: /admin/, /api/, /staging/, temp files. **Paths to use noindex** (allow crawl): /login/, /signup/, /thank-you/, etc.—see **indexing**.
56 
57### Location and Format
58 
59| Item | Requirement |
60|------|-------------|
61| **Path** | Site root: `https://example.com/robots.txt` |
62| **Encoding** | UTF-8 plain text |
63| **Standard** | RFC 9309 (Robots Exclusion Protocol) |
64 
65### Core Directives
66 
67| Directive | Purpose | Example |
68|-----------|---------|---------|
69| `User-agent:` | Target crawler | `User-agent: Googlebot`, `User-agent: *` |
70| `Disallow:` | Block path prefix | `Disallow: /admin/` |
71| `Allow:` | Allow path (can override Disallow) | `Allow: /public/` |
72| `Sitemap:` | Declare sitemap absolute URL | `Sitemap: https://example.com/sitemap.xml` |
73| `Clean-param:` | Strip query params (Yandex) | See below |
74 
75### Path Format Rules (Critical)
76 
77Different directives use different path formats — a common source of errors:
78 
79| Directive | Format | Correct | Wrong |
80|-----------|--------|---------|-------|
81| Disallow / Allow | **Root-relative path only** (starts with `/`) | `Disallow: /admin/` | `Disallow: https://example.com/admin/` |
82| Sitemap | **Absolute URL only** | `Sitemap: https://example.com/sitemap.xml` | `Sitemap: /sitemap.xml` |
83 
84**Wildcards**: `*` matches any character sequence (`Disallow: /tmp/*`). `$` marks exact URL ending (`Allow: /news/.html$`).
85 
86**Priority**: More specific paths take precedence. `Allow: /shop/shoes/` overrides `Disallow: /shop/`. Path matching is case-sensitive: `Disallow: /PDF/` does not match `/pdf/`.
87 
88### Critical: Do Not Block
89 
90| Do not block | Reason |
91|--------------|--------|
92| CSS, JS, images | Google needs them to render pages; blocking breaks indexing |
93| `/_next/` (Next.js) | Breaks CSS/JS loading; static assets in GSC "Crawled - not indexed" is expected. See **indexing** |
94| Pages that use noindex | Crawlers must access the page to read the noindex directive; blocking in robots.txt prevents that |
95 
96**Only block**: paths that don't need crawling: /admin/, /api/, /staging/, temp files.
97 
98### AI Crawler Strategy
99 
100robots.txt is effective for all measured AI crawlers. Set rules per user-agent; check each vendor's docs for current tokens.
101 
102| User-agent | Purpose | Typical | Notes |
103|------------|---------|---------|-------|
104| **OAI-SearchBot** | ChatGPT search | Allow | Respects robots.txt |
105| **GPTBot** | OpenAI training | Disallow | Respects robots.txt; shares crawl data with OAI-SearchBot if both allowed |
106| **ChatGPT-User** | User-initiated browsing | N/A | **No longer respects robots.txt** (Dec 2025); use server-side controls instead |
107| **Claude-SearchBot** | Claude search | Allow | Respects robots.txt |
108| **Claude-User** | Anthropic user-initiated browsing | Allow | Respects robots.txt (unlike ChatGPT-User) |
109| **ClaudeBot** | Anthropic training | Disallow | Respects robots.txt |
110> **Deprecated**: ~~anthropic-ai~~ — retired by Anthropic, replaced by ClaudeBot / Claude-User / Claude-SearchBot. References to `anthropic-ai` in robots.txt have no effect.
111| **PerplexityBot** | Perplexity search | Allow | Respects robots.txt |
112| **Google-Extended** | Gemini training | Disallow | Respects robots.txt |
113| **CCBot** | Common Crawl (LLM training) | Disallow | Respects robots.txt |
114| **Bytespider** | ByteDance | Disallow | Respects robots.txt |
115| **Meta-ExternalAgent** | Meta | Disallow | Respects robots.txt |
116| **AppleBot** | Apple (Siri, Spotlight); renders JS | Allow for indexing | Respects robots.txt |
117 
118**Allow vs Disallow**: Allow search/indexing bots (OAI-SearchBot, Claude-SearchBot, PerplexityBot); Disallow training-only bots (GPTBot, ClaudeBot, CCBot) if you don't want content used for model training.
119 
120**Important — ChatGPT-User exemption**: As of December 2025, **ChatGPT-User** no longer respects robots.txt directives. OpenAI considers it a proxy for human-initiated browsing. If you need to block it, use server-side controls (WAF rules, IP rate-limiting), not robots.txt. See **site-crawlability** for AI crawler optimization (SSR, URL management).
121 
122### Clean-param (Yandex)
123 
124```
125Clean-param: utm_source&utm_medium&utm_campaign&utm_term&utm_content&ref&fbclid&gclid
126```
127 
128## Output Format
129 
130- **Current state** (if auditing)
131- **Recommended robots.txt** (full file)
132- **Compliance checklist**
133- **References**: [Google robots.txt](https://developers.google.com/search/docs/crawling-indexing/robots/create-robots-txt)
134 
135## Related Skills
136 
137- **indexing**: Full noindex page-type list; when to use noindex vs robots.txt; GSC indexing diagnosis
138- **page-metadata**: Meta robots (noindex, nofollow) implementation
139- **xml-sitemap**: Sitemap URL to reference in robots.txt
140- **site-crawlability**: Broader crawl and structure guidance; AI crawler optimization
141- **rendering-strategies**: SSR, SSG, CSR; content in initial HTML for crawlers
142 

Discussion

Alternatives

Agentic Browsing ReadinessAudit and fix agent readiness: the Lighthouse Agentic Browsing fraction, accessibility tree for agents, robots.txt and Content-Signal for AI agents, WAF treatment of agent traffic, llms.txt, Markdown delivery, ai-catalog.json, /.well-known discovery files, and WebMCP tools. Exclude AI citability and brand signals (seo-geo) and commerce protocol depth (seo-ecommerce).Marketing · MITBacklink Profile AnalysisBacklink profile analysis: referring domains, anchor text distribution, toxic link detection, competitor gap analysis. Works with free APIs (Moz, Bing Webmaster, Common Crawl) and DataForSEO extension. Use when user says backlinks, link profile, referring domains, anchor text, toxic links, link gap, link building, disavow, or backlink audit.Marketing · MIT/setup-cmsConnect a CMS to notfair SEO tools. Guides users through configuring WordPress, Strapi, Contentful, or Ghost — tests the connection, and writes credentials to .env.local. Once set up, seo-analysis automatically cross- references CMS content against Google Search Console data. Use whenever the user says "connect my CMS", "set up WordPress", "configure Strapi", "add Contentful", "connect Ghost", or "CMS setup". Also trigger if the user asks why no CMS data appears in a seo-analysis report. · MITBacklink checkBacklink profile for any domain — referring domains, authority, anchors, new/lost links, and a side-by-side vs a competitor. Use when asked "check my backlinks", "backlink profile of X", "who links to them", or "link gap vs competitor".Marketing · MIT