$npx -y skills add norahe0304-art/30x-seo --skill 30x-seo-redirectsRedirect chain audit and analysis. Detects redirect loops, long chains, mixed protocols, and orphaned redirects. Use when user says "redirect audit", "301 redirect", "redirect chain", "redirect loop", or "migration redirects".
| 1 | # Redirect Audit |
| 2 | |
| 3 | ## What This Skill Does |
| 4 | |
| 5 | Analyzes website redirects to find problems that hurt SEO and user experience. |
| 6 | |
| 7 | ## Why Redirects Matter |
| 8 | |
| 9 | - **Every redirect = delay**: 301 redirects add 100-500ms latency |
| 10 | - **Chains lose link equity**: Google follows max ~5 hops, then stops |
| 11 | - **Wrong type = lost ranking**: 302 (temporary) doesn't pass full link juice |
| 12 | - **Loops = crawl waste**: Googlebot hits loop, gives up, page not indexed |
| 13 | |
| 14 | ## Check Categories |
| 15 | |
| 16 | ### 1. Redirect Chains |
| 17 | A redirect pointing to another redirect, pointing to another... |
| 18 | |
| 19 | ``` |
| 20 | BAD: /old → /old-2 → /old-3 → /final (3 hops, slow, loses equity) |
| 21 | GOOD: /old → /final (1 hop, fast, full equity) |
| 22 | ``` |
| 23 | |
| 24 | **Rule**: Maximum 1 redirect hop. More than 1 = fix immediately. |
| 25 | |
| 26 | ### 2. Redirect Loops |
| 27 | Page A redirects to B, B redirects back to A. Infinite loop. |
| 28 | |
| 29 | ``` |
| 30 | BAD: /page-a → /page-b → /page-a (loop!) |
| 31 | ``` |
| 32 | |
| 33 | **Detection**: Follow redirects up to 10 hops. If same URL appears twice = loop. |
| 34 | |
| 35 | ### 3. Redirect Type Audit |
| 36 | |
| 37 | | Type | When to Use | SEO Impact | |
| 38 | |------|-------------|------------| |
| 39 | | 301 | Permanent move | Passes ~95% link equity | |
| 40 | | 302 | Temporary (A/B test, maintenance) | Passes less equity, can cause issues if permanent | |
| 41 | | 307 | Temporary (preserves HTTP method) | Same as 302 | |
| 42 | | 308 | Permanent (preserves HTTP method) | Same as 301 | |
| 43 | | Meta refresh | NEVER for SEO | Bad UX, slow, not recommended | |
| 44 | | JavaScript redirect | Avoid if possible | Googlebot may not follow | |
| 45 | |
| 46 | **Rule**: Permanent moves must use 301 or 308. Using 302 for permanent = error. |
| 47 | |
| 48 | ### 4. Protocol Issues |
| 49 | |
| 50 | ``` |
| 51 | BAD: https://site.com → http://site.com (downgrade, security warning) |
| 52 | BAD: http → https → http (mixed, confusing) |
| 53 | GOOD: http://site.com → https://site.com (upgrade, correct) |
| 54 | ``` |
| 55 | |
| 56 | ### 5. Domain Consistency |
| 57 | |
| 58 | ``` |
| 59 | BAD: www.site.com → site.com → www.site.com (inconsistent) |
| 60 | GOOD: Pick ONE (www or non-www) and redirect all others to it |
| 61 | ``` |
| 62 | |
| 63 | ### 6. Trailing Slash Consistency |
| 64 | |
| 65 | ``` |
| 66 | BAD: /page → /page/ → /page (loop risk) |
| 67 | GOOD: Pick ONE pattern (/page or /page/) and redirect all others |
| 68 | ``` |
| 69 | |
| 70 | ### 7. Post-Migration Orphans |
| 71 | After site migration/redesign: |
| 72 | - Old URLs that redirect to 404 or homepage (should go to equivalent new page) |
| 73 | - Important pages with no redirect (losing all link equity) |
| 74 | |
| 75 | ### 8. Soft 404s via Redirect |
| 76 | Redirecting deleted pages to homepage = soft 404 penalty risk. |
| 77 | |
| 78 | ``` |
| 79 | BAD: /deleted-product → / (Google sees this as soft 404) |
| 80 | GOOD: /deleted-product → 410 Gone (or related category page) |
| 81 | ``` |
| 82 | |
| 83 | ## How to Run Audit |
| 84 | |
| 85 | ### Method 1: Crawl-based (recommended) |
| 86 | Use squirrel audit or similar crawler to: |
| 87 | 1. Crawl entire site |
| 88 | 2. Follow all internal links |
| 89 | 3. Record redirect chains |
| 90 | |
| 91 | ### Method 2: Log-based (for large sites) |
| 92 | Analyze server access logs for: |
| 93 | - All 301/302 responses |
| 94 | - Most-hit redirect URLs |
| 95 | - External referrers hitting redirects |
| 96 | |
| 97 | ### Method 3: URL list |
| 98 | If you have a list of old URLs (from migration): |
| 99 | 1. Check each URL |
| 100 | 2. Record final destination |
| 101 | 3. Flag chains, loops, 404s |
| 102 | |
| 103 | ## Output Format |
| 104 | |
| 105 | ### Redirect Health Score: XX/100 |
| 106 | |
| 107 | ### Critical Issues (Fix Immediately) |
| 108 | | Issue Type | Count | Example | |
| 109 | |------------|-------|---------| |
| 110 | | Redirect loops | X | /a → /b → /a | |
| 111 | | 5+ hop chains | X | /old → ... → /new | |
| 112 | | HTTPS downgrade | X | https → http | |
| 113 | |
| 114 | ### High Priority (Fix This Week) |
| 115 | | Issue Type | Count | Example | |
| 116 | |------------|-------|---------| |
| 117 | | 3-4 hop chains | X | /old → /mid → /new | |
| 118 | | 302 used for permanent | X | /old-page 302→ /new-page | |
| 119 | | Soft 404 redirects | X | /deleted → / | |
| 120 | |
| 121 | ### Medium Priority (Fix This Month) |
| 122 | | Issue Type | Count | Example | |
| 123 | |------------|-------|---------| |
| 124 | | 2 hop chains | X | /old → /mid → /new | |
| 125 | | Inconsistent trailing slash | X | /page and /page/ both exist | |
| 126 | |
| 127 | ### Redirect Map |
| 128 | Top 20 most-accessed redirects and their chains: |
| 129 | | Source URL | Hops | Final Destination | Type | Monthly Hits | |
| 130 | |------------|------|-------------------|------|--------------| |
| 131 | |
| 132 | ### Recommendations |
| 133 | 1. [Specific fix instructions based on findings] |
| 134 | |
| 135 | [PROTOCOL]: Update this header on changes, then check CLAUDE.md |