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.
Check for project context first: If .claude/project-context.md or .cursor/project-context.md exists, read it for site URL and indexing goals.
Identify:
https://example.com)PointNotePurposeControls crawler access; does NOT prevent indexing (disallowed URLs may still appear in search without snippet)AdvisoryRules are advisory; malicious crawlers may ignorePublicrobots.txt is publicly readable; use noindex or auth for sensitive content. See indexing
ToolControlsPrevents indexing?robots.txtCrawl (path-level)No—blocked URLs may still appear in SERPnoindex (meta / X-Robots-Tag)Index (page-level)Yes. See indexing****nofollowLink equity onlyNo—does not control indexing
UseToolExamplePath-level (whole directory)robots.txtDisallow: /admin/, Disallow: /api/, Disallow: /staging/Page-level (specific pages)noindex meta / X-Robots-TagLogin, signup, thank-you, 404, legal. See indexing for full listCriticalDo NOT block in robots.txtPages 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.
ItemRequirementPathSite root: https://example.com/robots.txtEncodingUTF-8 plain textStandardRFC 9309 (Robots Exclusion Protocol)
DirectivePurposeExampleUser-agent:Target crawlerUser-agent: Googlebot, User-agent: *``Disallow:Block path prefixDisallow: /admin/``Allow:Allow path (can override Disallow)Allow: /public/``Sitemap:Declare sitemap absolute URLSitemap: https://example.com/sitemap.xml``Clean-param:Strip query params (Yandex)See below
Do not blockReasonCSS, JS, imagesGoogle 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 indexingPages that use noindexCrawlers 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.
robots.txt is effective for all measured AI crawlers ( Vercel/MERJ study, 2024). Set rules per user-agent; check each vendor's docs for current tokens.
User-agentPurposeTypicalOAI-SearchBotChatGPT searchAllowGPTBotOpenAI trainingDisallowClaude-SearchBotClaude searchAllowClaudeBotAnthropic trainingDisallowPerplexityBotPerplexity searchAllowGoogle-ExtendedGemini trainingDisallowCCBotCommon Crawl (LLM training)DisallowBytespiderByteDanceDisallowMeta-ExternalAgentMetaDisallowAppleBotApple (Siri, Spotlight); renders JSAllow for indexing
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. See site-crawlability for AI crawler optimization (SSR, URL management).
text
Clean-param: utm_source&utm_medium&utm_campaign&utm_term&utm_content&ref&fbclid&gclid