@hanzlaa/rcode 4.3.3 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/README.md +28 -5
  3. package/cli/doctor.js +21 -3
  4. package/cli/generate-command-skills.cjs +1 -1
  5. package/cli/index.js +5 -1
  6. package/cli/install.js +7 -9
  7. package/cli/postinstall.js +22 -2
  8. package/cli/uninstall.js +48 -6
  9. package/dist/rcode.js +202 -203
  10. package/package.json +13 -23
  11. package/rcode/agents/rcode-codebase-mapper.md +12 -0
  12. package/rcode/agents/rcode-phase-researcher.md +13 -0
  13. package/rcode/agents/rcode-project-researcher.md +32 -0
  14. package/rcode/agents/rcode-roadmapper.md +15 -0
  15. package/rcode/agents/rules/planner/common-patterns.md +40 -0
  16. package/rcode/bin/lib/roadmap.cjs +184 -11
  17. package/rcode/bin/rcode-hooks.cjs +102 -151
  18. package/rcode/bin/rcode-tools.cjs +669 -55
  19. package/rcode/commands/lazy.md +10 -0
  20. package/rcode/data/intent-table.json +87 -0
  21. package/rcode/modules/seo.yaml +22 -0
  22. package/rcode/references/project-types.yaml +75 -0
  23. package/rcode/references/verb-dictionary.md +1 -1
  24. package/rcode/skills/SKILLS_INDEX.md +18 -1
  25. package/rcode/skills/actions/1-analysis/rcode-prfaq/SKILL.md +1 -1
  26. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/SKILL.md +4 -21
  27. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/templates/heartbeat.sh +0 -0
  28. package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +60 -1
  29. package/rcode/skills/core/rcode-init/scripts/__pycache__/rcode_init.cpython-38.pyc +0 -0
  30. package/rcode/skills/core/rcode-init/scripts/tests/__pycache__/test_rcode_init.cpython-38.pyc +0 -0
  31. package/rcode/skills/seo/module.yaml +20 -0
  32. package/rcode/skills/seo/on-page-seo-auditor/SKILL.md +308 -0
  33. package/rcode/skills/seo/on-page-seo-auditor/references/audit-example.md +109 -0
  34. package/rcode/skills/seo/on-page-seo-auditor/references/audit-templates.md +427 -0
  35. package/rcode/skills/seo/on-page-seo-auditor/references/bulk-audit-playbook.md +116 -0
  36. package/rcode/skills/seo/on-page-seo-auditor/references/scoring-rubric.md +525 -0
  37. package/rcode/skills/seo/rank-and-rent-local-seo/SKILL.md +94 -0
  38. package/rcode/skills/seo/rank-and-rent-local-seo/rules/city-matrix-and-pages.md +76 -0
  39. package/rcode/skills/seo/rank-and-rent-local-seo/rules/monetization.md +70 -0
  40. package/rcode/skills/seo/rank-and-rent-local-seo/rules/niche-selection.md +60 -0
  41. package/rcode/skills/seo/rank-and-rent-local-seo/rules/subniche-discovery.md +66 -0
  42. package/rcode/skills/seo/rank-and-rent-local-seo/templates/service-city-page.md +36 -0
  43. package/rcode/skills/seo/rank-and-rent-local-seo/templates/subniche-research-prompt.md +34 -0
  44. package/rcode/skills/seo/seo-audit/SKILL.md +412 -0
  45. package/rcode/skills/seo/seo-audit/evals/evals.json +136 -0
  46. package/rcode/skills/seo/seo-audit/references/ai-writing-detection.md +200 -0
  47. package/rcode/skills/seo/seo-content-factory/SKILL.md +130 -0
  48. package/rcode/skills/seo/seo-content-factory/rules/agents.md +80 -0
  49. package/rcode/skills/seo/seo-content-factory/rules/herdr-wave-mapping.md +80 -0
  50. package/rcode/skills/seo/seo-content-factory/rules/pipeline.md +102 -0
  51. package/rcode/skills/seo/seo-content-factory/rules/programmatic-pages.md +107 -0
  52. package/rcode/skills/seo/seo-content-factory/rules/quality-gates.md +68 -0
  53. package/rcode/skills/seo/seo-content-factory/rules/weekly-cadence.md +61 -0
  54. package/rcode/skills/seo/seo-content-factory/templates/BACKLOG.md +23 -0
  55. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/01-funnel-A1-A4.md +63 -0
  56. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/02-fanout-editorial-A5-A6-A8.md +28 -0
  57. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/03-fanout-programmatic-A7-A6-A8.md +25 -0
  58. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/04-loop-A9-A10.md +34 -0
  59. package/rcode/skills/seo/seo-content-factory/templates/article.mdx +39 -0
  60. package/rcode/skills/seo/seo-content-factory/templates/cluster.schema.json +52 -0
  61. package/rcode/skills/seo/seo-content-factory/templates/content-brief.md +51 -0
  62. package/rcode/skills/seo/seo-content-factory/templates/jsonld-builders.ts +49 -0
  63. package/rcode/skills/seo/seo-content-factory/templates/keywords.csv +13 -0
  64. package/rcode/skills/seo/seo-content-factory/templates/programmatic-page.tsx +58 -0
  65. package/rcode/skills/seo/seo-content-writer/SKILL.md +263 -0
  66. package/rcode/skills/seo/seo-content-writer/references/content-structure-templates.md +875 -0
  67. package/rcode/skills/seo/seo-content-writer/references/instructions-detail.md +239 -0
  68. package/rcode/skills/seo/seo-content-writer/references/seo-writing-checklist.md +250 -0
  69. package/rcode/skills/seo/seo-content-writer/references/title-formulas.md +339 -0
  70. package/rcode/skills/seo/seo-growth-orchestrator/SKILL.md +79 -0
  71. package/rcode/skills/seo/seo-growth-orchestrator/rules/backlinks.md +29 -0
  72. package/rcode/skills/seo/seo-growth-orchestrator/rules/content-engine.md +27 -0
  73. package/rcode/skills/seo/seo-growth-orchestrator/rules/dos-and-donts.md +40 -0
  74. package/rcode/skills/seo/seo-growth-orchestrator/rules/goals-protocol.md +34 -0
  75. package/rcode/skills/seo/seo-growth-orchestrator/rules/local-seo-stack.md +35 -0
  76. package/rcode/skills/seo/seo-growth-orchestrator/rules/mrr-sprint.md +27 -0
  77. package/rcode/skills/seo/seo-growth-orchestrator/rules/tools.md +19 -0
  78. package/rcode/skills/seo/seo-growth-orchestrator/templates/backlink-research.md +29 -0
  79. package/rcode/skills/seo/seo-growth-orchestrator/templates/goal-protocol.md +35 -0
  80. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-citations.md +24 -0
  81. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-city-pages.md +27 -0
  82. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-gbp-categories.md +23 -0
  83. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-gsc-goldmine.md +27 -0
  84. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-review-mining.md +26 -0
  85. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-30day-plan.md +19 -0
  86. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-cut.md +13 -0
  87. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-opportunity-finder.md +17 -0
  88. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-role-model.md +18 -0
  89. package/rcode/skills/seo/seo-site-builder/SKILL.md +149 -0
  90. package/rcode/skills/seo/seo-site-builder/rules/01-niche-discovery.md +64 -0
  91. package/rcode/skills/seo/seo-site-builder/rules/02-deep-research.md +164 -0
  92. package/rcode/skills/seo/seo-site-builder/rules/03-keyword-strategy.md +82 -0
  93. package/rcode/skills/seo/seo-site-builder/rules/04-content-plan.md +173 -0
  94. package/rcode/skills/seo/seo-site-builder/rules/05-site-build.md +187 -0
  95. package/rcode/skills/seo/seo-site-builder/rules/06-yolo.md +127 -0
  96. package/rcode/skills/seo/seo-site-builder/templates/article-stub.mdx +62 -0
  97. package/rcode/skills/seo/seo-site-builder/templates/image-prompt.md +97 -0
  98. package/rcode/skills/seo/seo-site-builder/templates/keyword-export.md +45 -0
  99. package/rcode/skills/seo/seo-site-builder/templates/niche-scorecard.md +28 -0
  100. package/rcode/skills/seo/technical-seo-checker/SKILL.md +329 -0
  101. package/rcode/skills/seo/technical-seo-checker/references/bulk-audit-playbook.md +118 -0
  102. package/rcode/skills/seo/technical-seo-checker/references/ecommerce-platform-patterns.md +166 -0
  103. package/rcode/skills/seo/technical-seo-checker/references/http-status-codes.md +705 -0
  104. package/rcode/skills/seo/technical-seo-checker/references/llm-crawler-handling.md +257 -0
  105. package/rcode/skills/seo/technical-seo-checker/references/pre-migration-playbook.md +137 -0
  106. package/rcode/skills/seo/technical-seo-checker/references/robots-txt-reference.md +717 -0
  107. package/rcode/skills/seo/technical-seo-checker/references/technical-audit-example.md +169 -0
  108. package/rcode/skills/seo/technical-seo-checker/references/technical-audit-templates.md +436 -0
  109. package/rcode/templates/settings-hooks.json +4 -0
  110. package/rcode/workflows/do.md +16 -0
  111. package/rcode/workflows/execute-sprint.md +22 -0
  112. package/rcode/workflows/execute.md +17 -3
  113. package/rcode/workflows/help.md +0 -2
  114. package/rcode/workflows/new-milestone.md +21 -9
  115. package/rcode/workflows/new-project-create-roadmap.md +2 -0
  116. package/rcode/workflows/new-project-roadmap.md +2 -0
  117. package/rcode/workflows/new-project.md +3 -0
  118. package/rcode/workflows/plan.md +15 -2
@@ -0,0 +1,717 @@
1
+ # Robots.txt Reference Guide
2
+
3
+ Complete reference for creating, testing, and troubleshooting robots.txt files.
4
+
5
+ ## Syntax Guide
6
+
7
+ ### Basic Structure
8
+
9
+ ```
10
+ User-agent: [bot name]
11
+ Disallow: [path to block]
12
+ Allow: [path to allow]
13
+ Sitemap: [sitemap URL]
14
+ Crawl-delay: [seconds]
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Core Directives
20
+
21
+ ### User-agent
22
+
23
+ Specifies which bot the rules apply to.
24
+
25
+ **Syntax**: `User-agent: [bot-name]`
26
+
27
+ **Common user-agents**:
28
+ ```
29
+ User-agent: * # All bots
30
+ User-agent: Googlebot # Google's crawler
31
+ User-agent: Bingbot # Bing's crawler
32
+ User-agent: GPTBot # OpenAI's crawler
33
+ User-agent: CCBot # Common Crawl bot
34
+ User-agent: anthropic-ai # Anthropic's crawler
35
+ User-agent: PerplexityBot # Perplexity AI crawler
36
+ User-agent: ClaudeBot # Claude's web crawler
37
+ ```
38
+
39
+ **Multiple user-agents**: Group rules by leaving no blank lines between user-agent declarations.
40
+
41
+ ```
42
+ User-agent: Googlebot
43
+ User-agent: Bingbot
44
+ Disallow: /admin/
45
+ ```
46
+
47
+ ---
48
+
49
+ ### Disallow
50
+
51
+ Blocks bots from crawling specified paths.
52
+
53
+ **Syntax**: `Disallow: [path]`
54
+
55
+ **Examples**:
56
+ ```
57
+ Disallow: / # Block entire site
58
+ Disallow: /admin/ # Block admin directory
59
+ Disallow: /private # Block private directory (and subdirectories)
60
+ Disallow: /*.pdf$ # Block all PDF files
61
+ Disallow: /*? # Block all URLs with parameters
62
+ Disallow: # Allow everything (empty disallow)
63
+ ```
64
+
65
+ **Path matching**:
66
+ - `/` at end = block directory and all subdirectories
67
+ - Without `/` at end = block all paths starting with string
68
+ - `*` = wildcard, matches any sequence
69
+ - `$` = end of URL
70
+
71
+ ---
72
+
73
+ ### Allow
74
+
75
+ Explicitly allows crawling (overrides Disallow).
76
+
77
+ **Syntax**: `Allow: [path]`
78
+
79
+ **Common use**: Allow specific subdirectories within blocked parent.
80
+
81
+ ```
82
+ User-agent: *
83
+ Disallow: /admin/
84
+ Allow: /admin/public/
85
+ ```
86
+
87
+ **Note**: Allow is not standard but supported by Google, Bing, and most major crawlers.
88
+
89
+ ---
90
+
91
+ ### Sitemap
92
+
93
+ Specifies location of XML sitemap.
94
+
95
+ **Syntax**: `Sitemap: [absolute URL]`
96
+
97
+ **Examples**:
98
+ ```
99
+ Sitemap: https://example.com/sitemap.xml
100
+ Sitemap: https://example.com/sitemap_index.xml
101
+ Sitemap: https://example.com/blog/sitemap.xml
102
+ ```
103
+
104
+ **Best practices**:
105
+ - Use absolute URLs (not relative)
106
+ - Can include multiple Sitemap directives
107
+ - Place at end of file
108
+ - Submit same sitemap(s) to Google Search Console
109
+
110
+ ---
111
+
112
+ ### Crawl-delay
113
+
114
+ Adds delay between requests (seconds).
115
+
116
+ **Syntax**: `Crawl-delay: [seconds]`
117
+
118
+ **Example**:
119
+ ```
120
+ User-agent: *
121
+ Crawl-delay: 10
122
+ ```
123
+
124
+ **Warning**: Not supported by Googlebot (use Search Console rate limiting instead). Supported by Bing, Yandex, and others.
125
+
126
+ ---
127
+
128
+ ## Common Configurations
129
+
130
+ ### 1. Allow All Bots (Default)
131
+
132
+ ```
133
+ User-agent: *
134
+ Disallow:
135
+
136
+ Sitemap: https://example.com/sitemap.xml
137
+ ```
138
+
139
+ Use when you want all bots to crawl entire site.
140
+
141
+ ---
142
+
143
+ ### 2. Block All Bots
144
+
145
+ ```
146
+ User-agent: *
147
+ Disallow: /
148
+ ```
149
+
150
+ Use for development/staging sites or private content.
151
+
152
+ ---
153
+
154
+ ### 3. Block Specific Directories
155
+
156
+ ```
157
+ User-agent: *
158
+ Disallow: /admin/
159
+ Disallow: /private/
160
+ Disallow: /temp/
161
+ Disallow: /cgi-bin/
162
+
163
+ Sitemap: https://example.com/sitemap.xml
164
+ ```
165
+
166
+ Standard configuration blocking admin and utility directories.
167
+
168
+ ---
169
+
170
+ ### 4. Block All AI Crawlers
171
+
172
+ ```
173
+ # Block OpenAI
174
+ User-agent: GPTBot
175
+ Disallow: /
176
+
177
+ # Block Anthropic
178
+ User-agent: anthropic-ai
179
+ User-agent: ClaudeBot
180
+ Disallow: /
181
+
182
+ # Block Common Crawl
183
+ User-agent: CCBot
184
+ Disallow: /
185
+
186
+ # Block Perplexity
187
+ User-agent: PerplexityBot
188
+ Disallow: /
189
+
190
+ # Block Google-Extended (Bard training)
191
+ User-agent: Google-Extended
192
+ Disallow: /
193
+
194
+ # Allow search engines
195
+ User-agent: Googlebot
196
+ Disallow:
197
+
198
+ User-agent: Bingbot
199
+ Disallow:
200
+
201
+ Sitemap: https://example.com/sitemap.xml
202
+ ```
203
+
204
+ Use when you want search indexing but not AI training.
205
+
206
+ ---
207
+
208
+ ### 5. Allow Search Engines, Block Everything Else
209
+
210
+ ```
211
+ # Block all by default
212
+ User-agent: *
213
+ Disallow: /
214
+
215
+ # Allow Google
216
+ User-agent: Googlebot
217
+ Disallow:
218
+
219
+ # Allow Bing
220
+ User-agent: Bingbot
221
+ Disallow:
222
+
223
+ # Allow DuckDuckGo
224
+ User-agent: DuckDuckBot
225
+ Disallow:
226
+
227
+ Sitemap: https://example.com/sitemap.xml
228
+ ```
229
+
230
+ ---
231
+
232
+ ### 6. Block URL Parameters
233
+
234
+ ```
235
+ User-agent: *
236
+ Disallow: /*? # Block all URLs with parameters
237
+ Allow: /? # Allow homepage with parameters
238
+
239
+ Sitemap: https://example.com/sitemap.xml
240
+ ```
241
+
242
+ Prevents duplicate content from parameter variations.
243
+
244
+ ---
245
+
246
+ ### 7. Block File Types
247
+
248
+ ```
249
+ User-agent: *
250
+ Disallow: /*.pdf$
251
+ Disallow: /*.doc$
252
+ Disallow: /*.xls$
253
+ Disallow: /*.zip$
254
+
255
+ Sitemap: https://example.com/sitemap.xml
256
+ ```
257
+
258
+ ---
259
+
260
+ ### 8. E-commerce Configuration
261
+
262
+ ```
263
+ User-agent: *
264
+ # Block search/filter pages
265
+ Disallow: /*?q=
266
+ Disallow: /*?sort=
267
+ Disallow: /*?filter=
268
+
269
+ # Block account pages
270
+ Disallow: /account/
271
+ Disallow: /cart/
272
+ Disallow: /checkout/
273
+
274
+ # Block admin
275
+ Disallow: /admin/
276
+
277
+ # Allow product pages
278
+ Allow: /products/
279
+
280
+ Sitemap: https://example.com/sitemap.xml
281
+ ```
282
+
283
+ ---
284
+
285
+ ### 9. WordPress Configuration
286
+
287
+ ```
288
+ User-agent: *
289
+ # WordPress core
290
+ Disallow: /wp-admin/
291
+ Allow: /wp-admin/admin-ajax.php
292
+
293
+ # WordPress directories
294
+ Disallow: /wp-includes/
295
+ Disallow: /wp-content/plugins/
296
+ Disallow: /wp-content/themes/
297
+
298
+ # Allow uploads
299
+ Allow: /wp-content/uploads/
300
+
301
+ # Block parameter pages
302
+ Disallow: /?s=
303
+ Disallow: /feed/
304
+ Disallow: /trackback/
305
+
306
+ Sitemap: https://example.com/sitemap_index.xml
307
+ ```
308
+
309
+ ---
310
+
311
+ ### 10. Shopify Configuration
312
+
313
+ ```
314
+ User-agent: *
315
+ # Block admin and account
316
+ Disallow: /admin
317
+ Disallow: /account
318
+ Disallow: /cart
319
+ Disallow: /checkout
320
+
321
+ # Block search
322
+ Disallow: /search
323
+
324
+ # Block collections with filters
325
+ Disallow: /collections/*+*
326
+ Disallow: /collections/*?*
327
+
328
+ Sitemap: https://example.com/sitemap.xml
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Platform-Specific Templates
334
+
335
+ ### Wix
336
+
337
+ ```
338
+ User-agent: *
339
+ Disallow: /_api/
340
+ Disallow: /_partials/
341
+
342
+ Sitemap: https://example.com/sitemap.xml
343
+ ```
344
+
345
+ ### Squarespace
346
+
347
+ ```
348
+ User-agent: *
349
+ Disallow: /config/
350
+ Disallow: /search
351
+
352
+ Sitemap: https://example.com/sitemap.xml
353
+ ```
354
+
355
+ ### Webflow
356
+
357
+ ```
358
+ User-agent: *
359
+ Allow: /
360
+
361
+ Sitemap: https://example.com/sitemap.xml
362
+ ```
363
+
364
+ ### Drupal
365
+
366
+ ```
367
+ User-agent: *
368
+ Disallow: /admin/
369
+ Disallow: /user/
370
+ Disallow: /node/add/
371
+ Disallow: /?q=
372
+
373
+ Sitemap: https://example.com/sitemap.xml
374
+ ```
375
+
376
+ ---
377
+
378
+ ## Testing and Validation
379
+
380
+ ### Google Search Console Robots.txt Tester
381
+
382
+ 1. Go to: Search Console → Settings → robots.txt
383
+ 2. View current robots.txt
384
+ 3. Test specific URLs
385
+ 4. See which user-agents are affected
386
+
387
+ ### Manual Testing
388
+
389
+ Test URL pattern: `https://example.com/robots.txt`
390
+
391
+ Check file is:
392
+ - Accessible (returns 200 status)
393
+ - Plain text format
394
+ - UTF-8 encoded
395
+ - Located at root domain
396
+ - No more than 500KB (Google limit)
397
+
398
+ ### Common Testing Scenarios
399
+
400
+ Test these URLs in tester:
401
+ - Homepage: `/`
402
+ - Product page: `/products/example`
403
+ - Admin page: `/admin/`
404
+ - Parameter page: `/search?q=test`
405
+ - File: `/document.pdf`
406
+
407
+ ---
408
+
409
+ ## Common Mistakes and Fixes
410
+
411
+ ### Mistake 1: Blocking CSS/JS Files
412
+
413
+ **Wrong**:
414
+ ```
415
+ User-agent: *
416
+ Disallow: /css/
417
+ Disallow: /js/
418
+ ```
419
+
420
+ **Why it's wrong**: Google needs CSS/JS to render pages properly.
421
+
422
+ **Fix**:
423
+ ```
424
+ User-agent: *
425
+ Allow: /css/
426
+ Allow: /js/
427
+ ```
428
+
429
+ ---
430
+
431
+ ### Mistake 2: Using Relative URLs for Sitemap
432
+
433
+ **Wrong**:
434
+ ```
435
+ Sitemap: /sitemap.xml
436
+ ```
437
+
438
+ **Fix**:
439
+ ```
440
+ Sitemap: https://example.com/sitemap.xml
441
+ ```
442
+
443
+ ---
444
+
445
+ ### Mistake 3: Spaces in Directives
446
+
447
+ **Wrong**:
448
+ ```
449
+ User-agent : Googlebot
450
+ Disallow : /admin/
451
+ ```
452
+
453
+ **Fix** (no spaces before colons):
454
+ ```
455
+ User-agent: Googlebot
456
+ Disallow: /admin/
457
+ ```
458
+
459
+ ---
460
+
461
+ ### Mistake 4: Forgetting Trailing Slash
462
+
463
+ **Intention**: Block /admin directory
464
+
465
+ **Wrong**:
466
+ ```
467
+ Disallow: /admin
468
+ ```
469
+
470
+ **Result**: Also blocks /admin-panel, /administrator, etc.
471
+
472
+ **Fix**:
473
+ ```
474
+ Disallow: /admin/
475
+ ```
476
+
477
+ ---
478
+
479
+ ### Mistake 5: Blocking Entire Site Accidentally
480
+
481
+ **Wrong**:
482
+ ```
483
+ User-agent: *
484
+ Disallow: /
485
+ Allow: /blog/
486
+ ```
487
+
488
+ **Why it's wrong**: Many bots don't support Allow directive.
489
+
490
+ **Fix**: Use noindex meta tags for pages you don't want indexed, not robots.txt.
491
+
492
+ ---
493
+
494
+ ### Mistake 6: Not Blocking Development Environments
495
+
496
+ **Wrong**: No robots.txt on staging.example.com
497
+
498
+ **Result**: Staging site gets indexed.
499
+
500
+ **Fix**:
501
+ ```
502
+ User-agent: *
503
+ Disallow: /
504
+ ```
505
+
506
+ On all non-production environments.
507
+
508
+ ---
509
+
510
+ ### Mistake 7: Case Sensitivity Errors
511
+
512
+ **Note**: Directives are case-insensitive, but paths are case-sensitive.
513
+
514
+ **Example**:
515
+ ```
516
+ Disallow: /Admin/ # Blocks /Admin/ but not /admin/
517
+ ```
518
+
519
+ **Fix**: Block both if needed:
520
+ ```
521
+ Disallow: /admin/
522
+ Disallow: /Admin/
523
+ ```
524
+
525
+ ---
526
+
527
+ ## Advanced Patterns
528
+
529
+ ### Wildcard Examples
530
+
531
+ ```
532
+ # Block all PDFs
533
+ Disallow: /*.pdf$
534
+
535
+ # Block all URLs with parameters
536
+ Disallow: /*?
537
+
538
+ # Block all URLs ending in .php
539
+ Disallow: /*.php$
540
+
541
+ # Block all admin paths regardless of location
542
+ Disallow: /*/admin/
543
+ ```
544
+
545
+ ### Multiple Sitemaps
546
+
547
+ ```
548
+ Sitemap: https://example.com/sitemap-pages.xml
549
+ Sitemap: https://example.com/sitemap-posts.xml
550
+ Sitemap: https://example.com/sitemap-products.xml
551
+ ```
552
+
553
+ ### Bot-Specific Rules
554
+
555
+ ```
556
+ # Aggressive bot - slow it down
557
+ User-agent: BadBot
558
+ Crawl-delay: 60
559
+ Disallow: /
560
+
561
+ # Good bots - full access
562
+ User-agent: Googlebot
563
+ User-agent: Bingbot
564
+ Disallow:
565
+
566
+ # Default for others
567
+ User-agent: *
568
+ Crawl-delay: 10
569
+ Disallow: /admin/
570
+ ```
571
+
572
+ ---
573
+
574
+ ## Robots.txt vs Meta Robots vs X-Robots-Tag
575
+
576
+ ### When to use each:
577
+
578
+ **Robots.txt**:
579
+ - Block crawling of entire directories
580
+ - Reduce crawl budget waste
581
+ - Block parameter variations
582
+ - Does NOT prevent indexing if page is linked from elsewhere
583
+
584
+ **Meta robots tag**:
585
+ - Prevent specific pages from being indexed
586
+ - Control snippet display
587
+ - Control following links
588
+ - Example: `<meta name="robots" content="noindex,follow">`
589
+
590
+ **X-Robots-Tag HTTP header**:
591
+ - Control non-HTML files (PDFs, images)
592
+ - Server-level control
593
+ - Example: `X-Robots-Tag: noindex`
594
+
595
+ **Important**: If you don't want a page indexed, use noindex (meta tag or header), NOT robots.txt.
596
+
597
+ ---
598
+
599
+ ## Monitoring and Maintenance
600
+
601
+ ### Regular Checks
602
+
603
+ **Monthly**:
604
+ - [ ] Verify robots.txt is accessible
605
+ - [ ] Check Search Console for blocked URLs
606
+ - [ ] Review crawl stats for blocked resources
607
+
608
+ **Quarterly**:
609
+ - [ ] Audit blocked paths - still relevant?
610
+ - [ ] Check for new admin/private sections to block
611
+ - [ ] Review AI crawler landscape (new bots?)
612
+
613
+ **After site changes**:
614
+ - [ ] Update robots.txt if URL structure changed
615
+ - [ ] Test new sections (should they be blocked?)
616
+ - [ ] Verify sitemaps still referenced
617
+
618
+ ### Search Console Monitoring
619
+
620
+ Check these reports:
621
+ - **Coverage** → Excluded by robots.txt
622
+ - **Settings** → Crawl stats
623
+ - **URL Inspection** → Test specific URLs
624
+
625
+ ---
626
+
627
+ ## Robots.txt Checklist
628
+
629
+ Before deploying:
630
+
631
+ - [ ] File is named exactly `robots.txt` (lowercase)
632
+ - [ ] Located at root domain (`example.com/robots.txt`)
633
+ - [ ] Plain text format (not HTML or PDF)
634
+ - [ ] UTF-8 encoding
635
+ - [ ] No HTML tags in file
636
+ - [ ] All paths start with `/`
637
+ - [ ] Sitemap URLs are absolute
638
+ - [ ] No spaces before colons
639
+ - [ ] Tested in Search Console robots.txt tester
640
+ - [ ] Not blocking important CSS/JS/images
641
+ - [ ] Not blocking content you want indexed
642
+ - [ ] Trailing slashes used correctly for directories
643
+ - [ ] Wildcard patterns tested
644
+ - [ ] File size under 500KB
645
+
646
+ ---
647
+
648
+ ## Emergency Fixes
649
+
650
+ ### Accidentally Blocked Entire Site
651
+
652
+ **Symptom**: All pages blocked in Search Console
653
+
654
+ **Fix**:
655
+ 1. Edit robots.txt to:
656
+ ```
657
+ User-agent: *
658
+ Disallow:
659
+
660
+ Sitemap: https://example.com/sitemap.xml
661
+ ```
662
+ 2. Test in Search Console
663
+ 3. Request urgent recrawl for key pages
664
+ 4. Monitor Coverage report for recovery
665
+
666
+ **Recovery time**: 1-7 days
667
+
668
+ ---
669
+
670
+ ### Blocked CSS/JS Files
671
+
672
+ **Symptom**: "Blocked by robots.txt" in Mobile-Friendly Test
673
+
674
+ **Fix**:
675
+ 1. Add Allow directives:
676
+ ```
677
+ User-agent: *
678
+ Allow: /css/
679
+ Allow: /js/
680
+ Allow: /wp-content/uploads/
681
+ ```
682
+ 2. Test in robots.txt tester
683
+ 3. Request re-render in URL Inspection tool
684
+
685
+ ---
686
+
687
+ ### Staging Site Indexed
688
+
689
+ **Symptom**: staging.example.com appears in search results
690
+
691
+ **Fix**:
692
+ 1. Add to staging robots.txt:
693
+ ```
694
+ User-agent: *
695
+ Disallow: /
696
+ ```
697
+ 2. Add noindex meta tag to all staging pages
698
+ 3. Remove staging URLs in Search Console (Removals tool)
699
+
700
+ ---
701
+
702
+ ## Resources and Tools
703
+
704
+ **Testing**:
705
+ - Google Search Console robots.txt tester
706
+ - Bing Webmaster Tools robots.txt analyzer
707
+ - Technical SEO browser extensions
708
+
709
+ **Validation**:
710
+ - https://www.google.com/webmasters/tools/robots-testing-tool
711
+ - https://en.ryte.com/free-tools/robots-txt/
712
+ - https://technicalseo.com/tools/robots-txt/
713
+
714
+ **Documentation**:
715
+ - Google: https://developers.google.com/search/docs/crawling-indexing/robots/intro
716
+ - Bing: https://www.bing.com/webmasters/help/robots-txt-validation
717
+ - Robots.txt spec: https://www.robotstxt.org/