@hanzlaa/rcode 4.3.3 → 4.4.0

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 (113) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/README.md +10 -4
  3. package/cli/doctor.js +21 -3
  4. package/cli/index.js +5 -1
  5. package/cli/install.js +2 -2
  6. package/cli/postinstall.js +1 -1
  7. package/cli/uninstall.js +48 -6
  8. package/dist/rcode.js +174 -170
  9. package/package.json +12 -22
  10. package/rcode/agents/rcode-codebase-mapper.md +12 -0
  11. package/rcode/agents/rcode-phase-researcher.md +13 -0
  12. package/rcode/agents/rcode-project-researcher.md +32 -0
  13. package/rcode/agents/rcode-roadmapper.md +15 -0
  14. package/rcode/agents/rules/planner/common-patterns.md +40 -0
  15. package/rcode/bin/lib/roadmap.cjs +184 -11
  16. package/rcode/bin/rcode-hooks.cjs +102 -151
  17. package/rcode/bin/rcode-tools.cjs +669 -55
  18. package/rcode/data/intent-table.json +87 -0
  19. package/rcode/modules/seo.yaml +22 -0
  20. package/rcode/references/project-types.yaml +75 -0
  21. package/rcode/skills/SKILLS_INDEX.md +17 -0
  22. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/SKILL.md +4 -21
  23. package/rcode/skills/actions/4-implementation/rcode-herdr-orchestration/templates/heartbeat.sh +0 -0
  24. package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +60 -1
  25. package/rcode/skills/core/rcode-init/scripts/__pycache__/rcode_init.cpython-38.pyc +0 -0
  26. package/rcode/skills/core/rcode-init/scripts/tests/__pycache__/test_rcode_init.cpython-38.pyc +0 -0
  27. package/rcode/skills/seo/module.yaml +20 -0
  28. package/rcode/skills/seo/on-page-seo-auditor/SKILL.md +308 -0
  29. package/rcode/skills/seo/on-page-seo-auditor/references/audit-example.md +109 -0
  30. package/rcode/skills/seo/on-page-seo-auditor/references/audit-templates.md +427 -0
  31. package/rcode/skills/seo/on-page-seo-auditor/references/bulk-audit-playbook.md +116 -0
  32. package/rcode/skills/seo/on-page-seo-auditor/references/scoring-rubric.md +525 -0
  33. package/rcode/skills/seo/rank-and-rent-local-seo/SKILL.md +94 -0
  34. package/rcode/skills/seo/rank-and-rent-local-seo/rules/city-matrix-and-pages.md +76 -0
  35. package/rcode/skills/seo/rank-and-rent-local-seo/rules/monetization.md +70 -0
  36. package/rcode/skills/seo/rank-and-rent-local-seo/rules/niche-selection.md +60 -0
  37. package/rcode/skills/seo/rank-and-rent-local-seo/rules/subniche-discovery.md +66 -0
  38. package/rcode/skills/seo/rank-and-rent-local-seo/templates/service-city-page.md +36 -0
  39. package/rcode/skills/seo/rank-and-rent-local-seo/templates/subniche-research-prompt.md +34 -0
  40. package/rcode/skills/seo/seo-audit/SKILL.md +412 -0
  41. package/rcode/skills/seo/seo-audit/evals/evals.json +136 -0
  42. package/rcode/skills/seo/seo-audit/references/ai-writing-detection.md +200 -0
  43. package/rcode/skills/seo/seo-content-factory/SKILL.md +130 -0
  44. package/rcode/skills/seo/seo-content-factory/rules/agents.md +80 -0
  45. package/rcode/skills/seo/seo-content-factory/rules/herdr-wave-mapping.md +80 -0
  46. package/rcode/skills/seo/seo-content-factory/rules/pipeline.md +102 -0
  47. package/rcode/skills/seo/seo-content-factory/rules/programmatic-pages.md +107 -0
  48. package/rcode/skills/seo/seo-content-factory/rules/quality-gates.md +68 -0
  49. package/rcode/skills/seo/seo-content-factory/rules/weekly-cadence.md +61 -0
  50. package/rcode/skills/seo/seo-content-factory/templates/BACKLOG.md +23 -0
  51. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/01-funnel-A1-A4.md +63 -0
  52. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/02-fanout-editorial-A5-A6-A8.md +28 -0
  53. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/03-fanout-programmatic-A7-A6-A8.md +25 -0
  54. package/rcode/skills/seo/seo-content-factory/templates/agent-prompts/04-loop-A9-A10.md +34 -0
  55. package/rcode/skills/seo/seo-content-factory/templates/article.mdx +39 -0
  56. package/rcode/skills/seo/seo-content-factory/templates/cluster.schema.json +52 -0
  57. package/rcode/skills/seo/seo-content-factory/templates/content-brief.md +51 -0
  58. package/rcode/skills/seo/seo-content-factory/templates/jsonld-builders.ts +49 -0
  59. package/rcode/skills/seo/seo-content-factory/templates/keywords.csv +13 -0
  60. package/rcode/skills/seo/seo-content-factory/templates/programmatic-page.tsx +58 -0
  61. package/rcode/skills/seo/seo-content-writer/SKILL.md +263 -0
  62. package/rcode/skills/seo/seo-content-writer/references/content-structure-templates.md +875 -0
  63. package/rcode/skills/seo/seo-content-writer/references/instructions-detail.md +239 -0
  64. package/rcode/skills/seo/seo-content-writer/references/seo-writing-checklist.md +250 -0
  65. package/rcode/skills/seo/seo-content-writer/references/title-formulas.md +339 -0
  66. package/rcode/skills/seo/seo-growth-orchestrator/SKILL.md +79 -0
  67. package/rcode/skills/seo/seo-growth-orchestrator/rules/backlinks.md +29 -0
  68. package/rcode/skills/seo/seo-growth-orchestrator/rules/content-engine.md +27 -0
  69. package/rcode/skills/seo/seo-growth-orchestrator/rules/dos-and-donts.md +40 -0
  70. package/rcode/skills/seo/seo-growth-orchestrator/rules/goals-protocol.md +34 -0
  71. package/rcode/skills/seo/seo-growth-orchestrator/rules/local-seo-stack.md +35 -0
  72. package/rcode/skills/seo/seo-growth-orchestrator/rules/mrr-sprint.md +27 -0
  73. package/rcode/skills/seo/seo-growth-orchestrator/rules/tools.md +19 -0
  74. package/rcode/skills/seo/seo-growth-orchestrator/templates/backlink-research.md +29 -0
  75. package/rcode/skills/seo/seo-growth-orchestrator/templates/goal-protocol.md +35 -0
  76. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-citations.md +24 -0
  77. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-city-pages.md +27 -0
  78. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-gbp-categories.md +23 -0
  79. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-gsc-goldmine.md +27 -0
  80. package/rcode/skills/seo/seo-growth-orchestrator/templates/local-review-mining.md +26 -0
  81. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-30day-plan.md +19 -0
  82. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-cut.md +13 -0
  83. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-opportunity-finder.md +17 -0
  84. package/rcode/skills/seo/seo-growth-orchestrator/templates/mrr-role-model.md +18 -0
  85. package/rcode/skills/seo/seo-site-builder/SKILL.md +149 -0
  86. package/rcode/skills/seo/seo-site-builder/rules/01-niche-discovery.md +64 -0
  87. package/rcode/skills/seo/seo-site-builder/rules/02-deep-research.md +164 -0
  88. package/rcode/skills/seo/seo-site-builder/rules/03-keyword-strategy.md +82 -0
  89. package/rcode/skills/seo/seo-site-builder/rules/04-content-plan.md +173 -0
  90. package/rcode/skills/seo/seo-site-builder/rules/05-site-build.md +187 -0
  91. package/rcode/skills/seo/seo-site-builder/rules/06-yolo.md +127 -0
  92. package/rcode/skills/seo/seo-site-builder/templates/article-stub.mdx +62 -0
  93. package/rcode/skills/seo/seo-site-builder/templates/image-prompt.md +97 -0
  94. package/rcode/skills/seo/seo-site-builder/templates/keyword-export.md +45 -0
  95. package/rcode/skills/seo/seo-site-builder/templates/niche-scorecard.md +28 -0
  96. package/rcode/skills/seo/technical-seo-checker/SKILL.md +329 -0
  97. package/rcode/skills/seo/technical-seo-checker/references/bulk-audit-playbook.md +118 -0
  98. package/rcode/skills/seo/technical-seo-checker/references/ecommerce-platform-patterns.md +166 -0
  99. package/rcode/skills/seo/technical-seo-checker/references/http-status-codes.md +705 -0
  100. package/rcode/skills/seo/technical-seo-checker/references/llm-crawler-handling.md +257 -0
  101. package/rcode/skills/seo/technical-seo-checker/references/pre-migration-playbook.md +137 -0
  102. package/rcode/skills/seo/technical-seo-checker/references/robots-txt-reference.md +717 -0
  103. package/rcode/skills/seo/technical-seo-checker/references/technical-audit-example.md +169 -0
  104. package/rcode/skills/seo/technical-seo-checker/references/technical-audit-templates.md +436 -0
  105. package/rcode/templates/settings-hooks.json +4 -0
  106. package/rcode/workflows/do.md +16 -0
  107. package/rcode/workflows/execute-sprint.md +22 -0
  108. package/rcode/workflows/execute.md +17 -3
  109. package/rcode/workflows/new-milestone.md +21 -9
  110. package/rcode/workflows/new-project-create-roadmap.md +2 -0
  111. package/rcode/workflows/new-project-roadmap.md +2 -0
  112. package/rcode/workflows/new-project.md +3 -0
  113. package/rcode/workflows/plan.md +15 -2
@@ -0,0 +1,705 @@
1
+ # HTTP Status Codes for SEO
2
+
3
+ SEO-relevant HTTP status codes, their implications, and how to diagnose and fix issues.
4
+
5
+ ## Status Code Categories
6
+
7
+ - **2xx**: Success - Request succeeded
8
+ - **3xx**: Redirection - Further action needed
9
+ - **4xx**: Client Error - Problem with the request
10
+ - **5xx**: Server Error - Server failed to fulfill request
11
+
12
+ ---
13
+
14
+ ## 2xx Success Codes
15
+
16
+ ### 200 OK
17
+
18
+ **What it means**: Request succeeded, content returned normally.
19
+
20
+ **SEO impact**: Positive - page is accessible and indexable.
21
+
22
+ **When to use**: Standard response for all working pages.
23
+
24
+ **When it's a problem**: When different URLs return 200 for same content (should use 301 redirect).
25
+
26
+ ---
27
+
28
+ ### 204 No Content
29
+
30
+ **What it means**: Request succeeded but no content to return.
31
+
32
+ **SEO impact**: Neutral - rarely used for pages meant to be indexed.
33
+
34
+ **Common use**: API responses, AJAX requests.
35
+
36
+ ---
37
+
38
+ ## 3xx Redirection Codes
39
+
40
+ ### 301 Moved Permanently
41
+
42
+ **What it means**: Resource permanently moved to new URL. All link equity transfers.
43
+
44
+ **SEO impact**: Positive when used correctly - passes 90-99% of link equity.
45
+
46
+ **When to use**:
47
+ - Permanently changing URL structure
48
+ - Consolidating duplicate content
49
+ - Moving to new domain
50
+ - Changing HTTP to HTTPS
51
+ - Changing www to non-www (or vice versa)
52
+
53
+ **Example header**:
54
+ ```
55
+ HTTP/1.1 301 Moved Permanently
56
+ Location: https://example.com/new-page
57
+ ```
58
+
59
+ **Common mistakes**:
60
+ - Using 302 instead of 301 for permanent changes
61
+ - Creating redirect chains (A→B→C)
62
+ - Redirecting to irrelevant pages
63
+ - Not redirecting HTTP to HTTPS
64
+
65
+ **How to implement**:
66
+ - **.htaccess** (Apache): `Redirect 301 /old-page /new-page`
67
+ - **nginx**: `rewrite ^/old-page$ /new-page permanent;`
68
+ - **Server-side**: Set Location header with 301 status
69
+
70
+ ---
71
+
72
+ ### 302 Found (Temporary Redirect)
73
+
74
+ **What it means**: Resource temporarily at different URL. Original URL should still be used.
75
+
76
+ **SEO impact**: Neutral to negative - does NOT pass full link equity. Search engines keep indexing original URL.
77
+
78
+ **When to use**:
79
+ - A/B testing
80
+ - Temporary promotions
81
+ - Maintenance redirects
82
+ - Geolocation redirects (sometimes)
83
+
84
+ **When NOT to use**: Permanent URL changes (use 301).
85
+
86
+ **Warning**: Google may treat long-standing 302s as 301s, but better to be explicit.
87
+
88
+ ---
89
+
90
+ ### 303 See Other
91
+
92
+ **What it means**: Response can be found at another URI using GET.
93
+
94
+ **SEO impact**: Minimal - rarely used for SEO purposes.
95
+
96
+ **Common use**: After form submissions, redirect to results page.
97
+
98
+ ---
99
+
100
+ ### 307 Temporary Redirect
101
+
102
+ **What it means**: Temporary redirect that preserves request method (POST stays POST).
103
+
104
+ **SEO impact**: Similar to 302 - temporary, doesn't pass full link equity.
105
+
106
+ **Difference from 302**: Guarantees request method won't change (more precise than 302).
107
+
108
+ **When to use**: Temporary redirects where HTTP method preservation matters.
109
+
110
+ ---
111
+
112
+ ### 308 Permanent Redirect
113
+
114
+ **What it means**: Permanent redirect that preserves request method.
115
+
116
+ **SEO impact**: Similar to 301 - passes link equity.
117
+
118
+ **Difference from 301**: Guarantees request method won't change (POST stays POST).
119
+
120
+ **When to use**: Permanent redirects where method preservation matters (rare for SEO).
121
+
122
+ ---
123
+
124
+ ### Redirect Chain Issues
125
+
126
+ **Problem**: Multiple redirects before reaching final destination.
127
+
128
+ **Example chain**:
129
+ ```
130
+ http://example.com/page
131
+ → https://example.com/page (redirect 1)
132
+ → https://www.example.com/page (redirect 2)
133
+ → https://www.example.com/new-page (redirect 3)
134
+ ```
135
+
136
+ **SEO impact**:
137
+ - Slows page load (each redirect = new HTTP request)
138
+ - Dilutes link equity with each hop
139
+ - Wastes crawl budget
140
+ - Poor user experience
141
+
142
+ **How to fix**: Redirect directly from original URL to final destination.
143
+
144
+ **Fixed version**:
145
+ ```
146
+ http://example.com/page
147
+ → https://www.example.com/new-page (single redirect)
148
+ ```
149
+
150
+ ---
151
+
152
+ ### Redirect Loops
153
+
154
+ **Problem**: Redirects create infinite loop.
155
+
156
+ **Example**:
157
+ ```
158
+ /page-a → /page-b
159
+ /page-b → /page-a
160
+ ```
161
+
162
+ **SEO impact**: Severe - page completely inaccessible.
163
+
164
+ **Symptoms**:
165
+ - Browser shows "Too many redirects" error
166
+ - Page never loads
167
+ - Search Console shows crawl errors
168
+
169
+ **How to diagnose**:
170
+ 1. Use redirect checker tool
171
+ 2. Check .htaccess or nginx config for conflicting rules
172
+ 3. Review server-side redirect logic
173
+
174
+ **How to fix**:
175
+ 1. Identify conflicting redirect rules
176
+ 2. Remove or correct the loop
177
+ 3. Test thoroughly
178
+ 4. Request recrawl in Search Console
179
+
180
+ ---
181
+
182
+ ## 4xx Client Error Codes
183
+
184
+ ### 404 Not Found
185
+
186
+ **What it means**: Requested resource doesn't exist.
187
+
188
+ **SEO impact**: Neutral to negative depending on context.
189
+
190
+ **When 404s are OK**:
191
+ - Legitimately deleted pages with no equivalent
192
+ - Never-existed URLs from typos
193
+ - Temporary content that expired (old promotions)
194
+ - Intentionally removed low-quality content
195
+
196
+ **When 404s are problems**:
197
+ - Pages that should exist are returning 404
198
+ - Previously working pages now broken
199
+ - Important pages missing from navigation
200
+ - High-traffic pages deleted without redirect
201
+
202
+ **How to fix**:
203
+ 1. **If content moved**: Set up 301 redirect to new location
204
+ 2. **If content deleted**: Either keep 404 or redirect to relevant category
205
+ 3. **If never existed**: Leave as 404
206
+ 4. **If important**: Restore the page
207
+
208
+ **Monitoring 404s**:
209
+ - Check Search Console → Coverage → Not found (404)
210
+ - Review referrer data to see what's linking to 404s
211
+ - Fix high-value 404s first (most traffic/backlinks)
212
+
213
+ **Soft 404s** (BAD):
214
+ - Page returns 200 but shows "not found" message
215
+ - Search engines may keep page indexed
216
+ - Creates duplicate content issues
217
+ - Fix: Return proper 404 status code
218
+
219
+ ---
220
+
221
+ ### 410 Gone
222
+
223
+ **What it means**: Resource permanently deleted, never coming back.
224
+
225
+ **SEO impact**: Stronger signal than 404 - tells search engines not to return.
226
+
227
+ **When to use**:
228
+ - Discontinued products
229
+ - Expired promotions
230
+ - Permanently removed content
231
+ - Outdated information
232
+
233
+ **Difference from 404**:
234
+ - 404: "Not found" (might exist at another URL)
235
+ - 410: "Gone forever" (don't look for it)
236
+
237
+ **When to use 410 vs 301**:
238
+ - Use 410: No equivalent replacement exists
239
+ - Use 301: Relevant alternative exists
240
+
241
+ **How search engines respond**:
242
+ - Faster de-indexing than 404
243
+ - Stop crawling sooner
244
+ - Better for crawl budget
245
+
246
+ ---
247
+
248
+ ### 403 Forbidden
249
+
250
+ **What it means**: Server understood request but refuses to authorize it.
251
+
252
+ **SEO impact**: Negative - page inaccessible and won't be indexed.
253
+
254
+ **Common causes**:
255
+ - Permission restrictions
256
+ - IP blocking
257
+ - .htaccess restrictions
258
+ - File permissions (chmod)
259
+ - Authentication required
260
+
261
+ **When it's intentional**:
262
+ - Admin areas
263
+ - Member-only content
264
+ - Geographic restrictions
265
+
266
+ **When it's a problem**:
267
+ - Public pages returning 403
268
+ - Search engine bots blocked
269
+ - Accidental permission changes
270
+
271
+ **How to diagnose**:
272
+ 1. Check .htaccess for IP restrictions
273
+ 2. Verify file permissions (should be 644 for files, 755 for directories)
274
+ 3. Check server-level access rules
275
+ 4. Test with different IPs/user-agents
276
+
277
+ **How to fix**:
278
+ 1. Adjust file permissions: `chmod 644 filename`
279
+ 2. Remove blocking rules from .htaccess
280
+ 3. Whitelist search engine bots
281
+ 4. Review server firewall rules
282
+
283
+ ---
284
+
285
+ ### 401 Unauthorized
286
+
287
+ **What it means**: Authentication required but not provided or failed.
288
+
289
+ **SEO impact**: Negative - page won't be indexed.
290
+
291
+ **Common causes**:
292
+ - Password-protected pages
293
+ - HTTP Basic Authentication
294
+ - Expired sessions
295
+ - Missing credentials
296
+
297
+ **When it's intentional**: Member areas, staging sites, admin panels.
298
+
299
+ **How to handle for SEO**:
300
+ - Don't password-protect pages you want indexed
301
+ - Use separate staging domain with 401
302
+ - For members-only content, show teaser with meta robots noindex
303
+
304
+ ---
305
+
306
+ ### 429 Too Many Requests
307
+
308
+ **What it means**: User/bot sent too many requests in given timeframe (rate limiting).
309
+
310
+ **SEO impact**: Negative if search engines can't crawl.
311
+
312
+ **Common causes**:
313
+ - Aggressive crawling
314
+ - DDoS protection triggered
315
+ - API rate limits
316
+ - Server throttling
317
+
318
+ **How to handle**:
319
+ 1. Check Googlebot isn't being rate-limited (use Search Console)
320
+ 2. Whitelist verified search engine bots
321
+ 3. Configure rate limits appropriately
322
+ 4. Monitor crawl rate in Search Console
323
+
324
+ ---
325
+
326
+ ## 5xx Server Error Codes
327
+
328
+ ### 500 Internal Server Error
329
+
330
+ **What it means**: Generic server error, something went wrong.
331
+
332
+ **SEO impact**: Very negative if persistent - prevents indexing and ranking.
333
+
334
+ **Common causes**:
335
+ - PHP/code errors
336
+ - Database connection issues
337
+ - .htaccess syntax errors
338
+ - Resource limits exceeded
339
+ - Plugin/theme conflicts (WordPress)
340
+
341
+ **How to diagnose**:
342
+ 1. Check server error logs
343
+ 2. Review recent code/config changes
344
+ 3. Test locally or on staging
345
+ 4. Disable plugins one by one (if CMS)
346
+ 5. Check .htaccess syntax
347
+
348
+ **How to fix**:
349
+ 1. Review error logs for specific error
350
+ 2. Roll back recent changes
351
+ 3. Fix code errors
352
+ 4. Increase resource limits if needed
353
+ 5. Test thoroughly before re-deploying
354
+
355
+ **Monitoring**: Set up alerts for 500 errors (sudden spike = problem).
356
+
357
+ ---
358
+
359
+ ### 502 Bad Gateway
360
+
361
+ **What it means**: Server received invalid response from upstream server.
362
+
363
+ **SEO impact**: Negative if persistent - prevents crawling/indexing.
364
+
365
+ **Common causes**:
366
+ - Proxy/load balancer issues
367
+ - Upstream server down
368
+ - Timeout issues
369
+ - Firewall blocking
370
+
371
+ **Common scenarios**:
372
+ - CDN can't reach origin server
373
+ - Application server crashed
374
+ - Database server unresponsive
375
+
376
+ **How to fix**:
377
+ 1. Check upstream server status
378
+ 2. Verify firewall rules
379
+ 3. Check timeout settings
380
+ 4. Restart proxy/load balancer if needed
381
+ 5. Review CDN configuration
382
+
383
+ ---
384
+
385
+ ### 503 Service Unavailable
386
+
387
+ **What it means**: Server temporarily unable to handle request.
388
+
389
+ **SEO impact**: Neutral if truly temporary with Retry-After header. Negative if prolonged.
390
+
391
+ **Common causes**:
392
+ - Maintenance mode
393
+ - Server overload
394
+ - Database down
395
+ - Resource exhaustion
396
+
397
+ **Proper use for maintenance**:
398
+ ```
399
+ HTTP/1.1 503 Service Unavailable
400
+ Retry-After: 3600
401
+ ```
402
+
403
+ **Best practices for maintenance**:
404
+ 1. Use 503 (not 404 or 500)
405
+ 2. Include Retry-After header
406
+ 3. Keep maintenance brief (<24 hours)
407
+ 4. Schedule during low-traffic times
408
+ 5. Inform users with clear message
409
+
410
+ **How search engines handle 503**:
411
+ - Short-term (hours): Will retry, no ranking impact
412
+ - Long-term (days+): May drop rankings, de-index pages
413
+
414
+ ---
415
+
416
+ ### 504 Gateway Timeout
417
+
418
+ **What it means**: Server didn't receive timely response from upstream server.
419
+
420
+ **SEO impact**: Negative - prevents crawling.
421
+
422
+ **Common causes**:
423
+ - Slow database queries
424
+ - External API timeouts
425
+ - Insufficient server resources
426
+ - Network issues
427
+
428
+ **How to fix**:
429
+ 1. Optimize slow queries
430
+ 2. Increase timeout limits
431
+ 3. Add caching
432
+ 4. Scale server resources
433
+ 5. Review external dependencies
434
+
435
+ ---
436
+
437
+ ## Status Code Decision Flowchart
438
+
439
+ ### Content Moved Permanently?
440
+ → YES: Use **301 redirect**
441
+ → NO: Continue
442
+
443
+ ### Content Moved Temporarily?
444
+ → YES: Use **302 redirect**
445
+ → NO: Continue
446
+
447
+ ### Content Deleted with No Replacement?
448
+ → YES: Use **404** (or **410** if permanently gone)
449
+ → NO: Continue
450
+
451
+ ### Content Exists at This URL?
452
+ → YES: Use **200 OK**
453
+ → NO: Use **404**
454
+
455
+ ### Need Authentication?
456
+ → YES: Use **401**
457
+ → NO: Continue
458
+
459
+ ### Access Forbidden?
460
+ → YES: Use **403**
461
+ → NO: Continue
462
+
463
+ ### Server Error?
464
+ → YES: Use **500**, **502**, **503**, or **504** depending on cause
465
+ → NO: Use **200 OK**
466
+
467
+ ---
468
+
469
+ ## Diagnosing Status Code Issues
470
+
471
+ ### Tools
472
+
473
+ **Browser DevTools**:
474
+ 1. Open DevTools (F12)
475
+ 2. Go to Network tab
476
+ 3. Reload page
477
+ 4. Check status code in first request
478
+
479
+ **cURL command**:
480
+ ```bash
481
+ curl -I https://example.com/page
482
+ ```
483
+
484
+ **Online checkers**:
485
+ - httpstatus.io
486
+ - redirect-checker.org
487
+ - websiteplanet.com/webtools/redirects/
488
+
489
+ **Google Search Console**:
490
+ - Coverage report → Error/Excluded sections
491
+ - URL Inspection tool → Check specific URLs
492
+
493
+ ---
494
+
495
+ ### Common Diagnostic Scenarios
496
+
497
+ ### "Page Won't Index"
498
+
499
+ **Check**:
500
+ 1. Status code (should be 200)
501
+ 2. Redirects (shouldn't redirect away)
502
+ 3. 4xx/5xx errors
503
+ 4. robots.txt blocking
504
+ 5. noindex meta tag
505
+
506
+ ### "Page Disappeared from Results"
507
+
508
+ **Check**:
509
+ 1. Returns 404/410/5xx
510
+ 2. Redirecting elsewhere (301/302)
511
+ 3. Changed to 403/401
512
+ 4. Server timing out (504)
513
+
514
+ ### "Traffic Dropped After Migration"
515
+
516
+ **Check**:
517
+ 1. Old URLs return 404 (should be 301)
518
+ 2. Redirect chains (should be direct)
519
+ 3. Redirect loops
520
+ 4. Wrong redirect type (302 vs 301)
521
+ 5. Incorrect redirect targets
522
+
523
+ ---
524
+
525
+ ## Status Codes and Crawl Budget
526
+
527
+ ### Impact on Crawl Budget
528
+
529
+ **Efficient (minimal impact)**:
530
+ - 200 OK
531
+ - 301 redirects (if minimal chains)
532
+ - 410 Gone (removes from crawl queue)
533
+
534
+ **Moderate impact**:
535
+ - 302 redirects (search engine may keep checking)
536
+ - 404 errors (search engines periodically recheck)
537
+ - Redirect chains (multiple requests per URL)
538
+
539
+ **High impact (wasteful)**:
540
+ - 5xx errors (search engines retry frequently)
541
+ - Redirect loops (waste crawl budget)
542
+ - Soft 404s (search engine confused, keeps crawling)
543
+ - 429 rate limiting (prevents efficient crawling)
544
+
545
+ ---
546
+
547
+ ## SEO Status Code Best Practices
548
+
549
+ ### For Migrations
550
+
551
+ - [ ] Use 301 redirects for all permanently moved pages
552
+ - [ ] Redirect directly to final destination (no chains)
553
+ - [ ] Test all redirects before launching
554
+ - [ ] Keep redirects in place for at least 1 year
555
+ - [ ] Monitor 404 errors in Search Console post-launch
556
+ - [ ] Map 1:1 where possible (old URL → equivalent new URL)
557
+
558
+ ### For Deleted Content
559
+
560
+ - [ ] Use 301 if relevant replacement exists
561
+ - [ ] Use 404 if no replacement and might return
562
+ - [ ] Use 410 if permanently gone, never returning
563
+ - [ ] Don't redirect to irrelevant pages (creates soft 404)
564
+ - [ ] Create custom 404 page with search and navigation
565
+
566
+ ### For Maintenance
567
+
568
+ - [ ] Use 503 with Retry-After header
569
+ - [ ] Keep maintenance window brief (<24 hours)
570
+ - [ ] Create user-friendly maintenance page
571
+ - [ ] Inform users of expected downtime
572
+ - [ ] Monitor Search Console for crawl issues
573
+
574
+ ### For Performance
575
+
576
+ - [ ] Minimize redirect chains
577
+ - [ ] Fix redirect loops immediately
578
+ - [ ] Monitor 5xx errors closely
579
+ - [ ] Set up alerts for sudden status code changes
580
+ - [ ] Optimize to reduce 504 timeouts
581
+
582
+ ---
583
+
584
+ ## Status Code Monitoring
585
+
586
+ ### Key Metrics to Track
587
+
588
+ **In Search Console**:
589
+ - Crawl errors by type
590
+ - Server errors (5xx) trend
591
+ - Not found (404) trend
592
+ - Redirect errors
593
+
594
+ **In analytics**:
595
+ - 404 page views
596
+ - Entry pages with high exit rate (might be errors)
597
+ - Sudden traffic drops (could indicate status code issues)
598
+
599
+ **Server logs**:
600
+ - Status code distribution
601
+ - 5xx error frequency
602
+ - Unusual patterns
603
+
604
+ ### Setting Up Alerts
605
+
606
+ **Alert on**:
607
+ - Sudden increase in 5xx errors
608
+ - Increase in 404 errors
609
+ - New redirect chains
610
+ - Crawl error spikes in Search Console
611
+
612
+ **Tools**:
613
+ - Google Search Console email alerts
614
+ - Server monitoring (UptimeRobot, Pingdom)
615
+ - Log analysis tools
616
+ - Custom scripts for log monitoring
617
+
618
+ ---
619
+
620
+ ## Quick Reference Table
621
+
622
+ | Code | Name | SEO Impact | Use When | Passes Link Equity? |
623
+ |------|------|------------|----------|---------------------|
624
+ | 200 | OK | ✅ Positive | Page works normally | N/A (original URL) |
625
+ | 301 | Moved Permanently | ✅ Positive | Permanent URL change | ✅ Yes (~90-99%) |
626
+ | 302 | Found | ⚠️ Neutral | Temporary redirect | ❌ No |
627
+ | 307 | Temporary Redirect | ⚠️ Neutral | Temporary (method preserved) | ❌ No |
628
+ | 308 | Permanent Redirect | ✅ Positive | Permanent (method preserved) | ✅ Yes |
629
+ | 404 | Not Found | ⚠️ Neutral | Content doesn't exist | N/A |
630
+ | 410 | Gone | ⚠️ Neutral | Permanent deletion | N/A |
631
+ | 403 | Forbidden | ❌ Negative | Access denied | N/A |
632
+ | 401 | Unauthorized | ❌ Negative | Auth required | N/A |
633
+ | 500 | Internal Server Error | ❌ Negative | Server error | N/A |
634
+ | 502 | Bad Gateway | ❌ Negative | Upstream error | N/A |
635
+ | 503 | Service Unavailable | ⚠️ Neutral | Temporary downtime | N/A |
636
+ | 504 | Gateway Timeout | ❌ Negative | Timeout error | N/A |
637
+
638
+ ---
639
+
640
+ ## Status Code Testing Checklist
641
+
642
+ Before launching site changes:
643
+
644
+ - [ ] Test all redirects return correct status codes
645
+ - [ ] Verify no redirect chains exist
646
+ - [ ] Check no redirect loops present
647
+ - [ ] Confirm important pages return 200
648
+ - [ ] Ensure deleted pages return 404/410 (not 200)
649
+ - [ ] Verify 301s point to correct destinations
650
+ - [ ] Test with multiple user-agents
651
+ - [ ] Check status codes in Search Console
652
+ - [ ] Monitor server logs for unusual patterns
653
+ - [ ] Set up alerts for error spikes
654
+
655
+ ---
656
+
657
+ ## Technical SEO Severity Framework
658
+
659
+ ### Issue Classification
660
+
661
+ | Severity | Impact Description | Examples | Response Time |
662
+ |----------|-------------------|---------|---------------|
663
+ | **Critical** | Prevents indexation or causes site-wide issues | Robots.txt blocking site, noindex on key pages, site-wide 500 errors | Same day |
664
+ | **High** | Significantly impacts rankings or user experience | Slow page speed, missing hreflang, duplicate content, redirect chains | Within 1 week |
665
+ | **Medium** | Affects specific pages or has moderate impact | Missing schema, suboptimal canonicals, thin content pages | Within 1 month |
666
+ | **Low** | Minor optimization opportunities | Image compression, minor CLS issues, non-essential schema missing | Next quarter |
667
+
668
+ ### Technical Debt Prioritization Matrix
669
+
670
+ | Factor | Weight | Assessment |
671
+ |--------|--------|-----------|
672
+ | Pages affected | 30% | Site-wide > Section > Single page |
673
+ | Revenue impact | 25% | Revenue pages > Blog > Utility pages |
674
+ | Fix difficulty | 20% | Config change < Template change < Code rewrite |
675
+ | Competitive impact | 15% | Competitors passing you > parity > you ahead |
676
+ | Crawl budget waste | 10% | High waste > Moderate > Minimal |
677
+
678
+ ## Core Web Vitals Optimization Quick Reference
679
+
680
+ ### LCP (Largest Contentful Paint) Optimization
681
+
682
+ | Root Cause | Detection | Fix |
683
+ |-----------|-----------|-----|
684
+ | Large hero image | PageSpeed Insights | Serve WebP, resize to container, add loading="lazy" |
685
+ | Render-blocking CSS/JS | DevTools Coverage | Defer non-critical, inline critical CSS |
686
+ | Slow server response | TTFB >800ms | CDN, server-side caching, upgrade hosting |
687
+ | Third-party scripts | DevTools Network | Defer/async, use facade pattern |
688
+
689
+ ### CLS (Cumulative Layout Shift) Optimization
690
+
691
+ | Root Cause | Detection | Fix |
692
+ |-----------|-----------|-----|
693
+ | Images without dimensions | DevTools | Add explicit width/height attributes |
694
+ | Ads/embeds without reserved space | Visual inspection | Set min-height on containers |
695
+ | Web fonts causing FOUT | DevTools | font-display: swap + preload fonts |
696
+ | Dynamic content injection | Visual inspection | Reserve space with CSS |
697
+
698
+ ### INP (Interaction to Next Paint) Optimization
699
+
700
+ | Root Cause | Detection | Fix |
701
+ |-----------|-----------|-----|
702
+ | Long JavaScript tasks | DevTools Performance | Break into smaller tasks, use requestIdleCallback |
703
+ | Heavy event handlers | DevTools | Debounce/throttle, use passive listeners |
704
+ | Main thread blocking | DevTools | Web workers for heavy computation |
705
+