# WordPress Archive Redirects

**Last Updated:** 2026-01-18

Documentation for WordPress archive redirects implemented after blog migration to static PHP pages.

## Overview

After migrating the blog from WordPress to static PHP pages (completed 2026-01-14), old WordPress archive pages (author archives and date archives) were still accessible and serving content. These archive pages have been redirected to the main blog index (`/insights/`) to:

- Prevent duplicate content issues
- Consolidate SEO value to the main blog index
- Improve crawl efficiency
- Follow SEO best practices for single-author blogs

## Redirect Patterns

### Author Archives

**Patterns Redirected:**
- `/insights/author/{author-slug}/` → `/insights/`
- `/insights/author/{author-slug}/page/{page}/` → `/insights/`

**Examples:**
- `/insights/author/evergreen-content/` → `/insights/`
- `/insights/author/evergreen-content/page/2/` → `/insights/`
- `/insights/author/vanessa/` → `/insights/`
- `/insights/author/david/` → `/insights/`
- `/insights/author/britta/` → `/insights/`
- `/insights/author/maren/` → `/insights/`

**Total URLs Redirected:** 12 (5 base + 7 pagination)

### Date Archives

**Patterns Redirected:**
- `/insights/{year}/{month}/` → `/insights/`
- `/insights/{year}/{month}/page/{page}/` → `/insights/`

**Examples:**
- `/insights/2023/10/` → `/insights/`
- `/insights/2023/11/` → `/insights/`
- `/insights/2022/07/page/2/` → `/insights/`
- `/insights/2024/12/` → `/insights/`

**Date Range:** 2022-07 through 2024-12

**Total URLs Redirected:** 19 (15 base + 4 pagination)

## Implementation

### .htaccess Rules

Redirect rules are placed in `.htaccess` after canonicalization rules and before blog routes to ensure they catch archive URLs before they match valid blog post patterns.

**Location:** Lines 189-207 in `.htaccess`

**Rules:**

```apache
# WordPress Archive Redirects - Redirect old WordPress author and date archives to blog index
# These patterns are from the migrated WordPress blog and should redirect to /insights/
# Placed before blog routes to catch archive URLs before they match valid blog post patterns

# Author archive redirects (with and without pagination)
# Pattern: /insights/author/{author-slug}/ or /insights/author/{author-slug}/page/{page}/
RewriteRule ^insights/author/([^/]+)/page/([0-9]+)/?$ /insights/ [R=301,L]
RewriteRule ^insights/author/([^/]+)/?$ /insights/ [R=301,L]

# Date archive redirects (year/month with and without pagination)
# Pattern: /insights/{year}/{month}/ or /insights/{year}/{month}/page/{page}/
# Must exclude valid category names (lexikon, ratgeber, inside-ordio) and topics
# Using RewriteCond to ensure we only match numeric year/month patterns, not category slugs
RewriteCond %{REQUEST_URI} ^/insights/\d{4}/\d{2}/page/\d+/?$ [NC]
RewriteCond %{REQUEST_URI} !^/insights/(lexikon|ratgeber|inside-ordio|topics)/ [NC]
RewriteRule ^insights/(\d{4})/(\d{2})/page/(\d+)/?$ /insights/ [R=301,L]
RewriteCond %{REQUEST_URI} ^/insights/\d{4}/\d{2}/?$ [NC]
RewriteCond %{REQUEST_URI} !^/insights/(lexikon|ratgeber|inside-ordio|topics)/ [NC]
RewriteRule ^insights/(\d{4})/(\d{2})/?$ /insights/ [R=301,L]
```

### Rule Order

Rules are placed in this order:

1. **Canonicalization rules** (lines 175-187) - Handle trailing slashes and URL normalization
2. **WordPress archive redirects** (lines 189-207) - Redirect old WordPress archives
3. **Blog routes** (lines 209+) - Handle valid blog post URLs

This ensures:
- Archive URLs are caught and redirected before matching blog post patterns
- Valid blog post URLs (`/insights/{category}/{slug}/`) are not affected
- Category URLs (`/insights/lexikon/`, `/insights/ratgeber/`, etc.) are not affected

## SEO Rationale

### Why Redirect Author Archives?

1. **Single-Author Blog:** Ordio blog is primarily single-author, making author archives duplicate content
2. **SEO Best Practice:** Yoast SEO and other SEO tools recommend disabling/redirecting author archives for single-author sites
3. **Consolidate Link Equity:** Redirects pass link equity to the main blog index
4. **Reduce Crawl Budget:** Fewer pages to crawl improves crawl efficiency

### Why Redirect Date Archives?

1. **Thin Content:** Date archives often contain thin, non-useful content
2. **Low User Value:** Users rarely navigate by date; category-based navigation is more useful
3. **SEO Best Practice:** Date archives can dilute SEO signals and create duplicate content
4. **Consolidate Authority:** Redirects consolidate SEO value to the main blog index

## Testing

### Test Script

A test script validates redirect patterns: `v2/scripts/test-wordpress-redirects.php`

**Run:**
```bash
php v2/scripts/test-wordpress-redirects.php
```

**Test Coverage:**
- ✅ 31 archive URLs correctly redirect to `/insights/`
- ✅ 7 valid blog URLs are NOT redirected (as expected)
- ✅ Author archives (with and without pagination)
- ✅ Date archives (with and without pagination)
- ✅ Valid blog post URLs remain unaffected

### Manual Testing

**Author Archives:**
```bash
curl -I https://www.ordio.com/insights/author/evergreen-content/
# Expected: HTTP/1.1 301 Moved Permanently
# Location: /insights/
```

**Date Archives:**
```bash
curl -I https://www.ordio.com/insights/2023/10/
# Expected: HTTP/1.1 301 Moved Permanently
# Location: /insights/
```

**Valid Blog Posts (Should NOT Redirect):**
```bash
curl -I https://www.ordio.com/insights/lexikon/test-post/
# Expected: HTTP/1.1 200 OK (or 404 if post doesn't exist, but NOT 301)
```

## URL Analysis

### Source Data

URLs were identified from SEO audit CSV:
- File: `ordio_17-jan-2026_missing-alt-text_2026-01-18_06-07-50.csv`
- Total WordPress archive URLs found: 31
- Analysis date: 2026-01-18

### Author Slugs Identified

- `evergreen-content` (Emma)
- `vanessa` (Vanessa Merx)
- `david` (David)
- `britta` (Britta)
- `maren` (Maren/Emma Caspers)

### Date Archives Identified

**Years/Months:**
- 2022: 07, 09
- 2023: 03, 04, 05, 06, 07, 08, 09, 10, 11, 12
- 2024: 03, 11, 12

## Monitoring

### Google Search Console

Monitor Google Search Console for:
- Redirect chains (should be none)
- Crawl errors (should decrease)
- Index status of archive URLs (should drop over time)

### Expected Behavior

1. **Immediate:** Archive URLs return 301 redirects to `/insights/`
2. **Within 1-2 weeks:** Google starts dropping archive URLs from index
3. **Within 1-2 months:** Archive URLs fully removed from Google index
4. **Ongoing:** Link equity consolidates to `/insights/`

## Related Documentation

- [Blog Migration Completion Report](./MIGRATION_COMPLETION_REPORT_2026-01-14.md) - Migration status
- [WordPress Structure](./WORDPRESS_STRUCTURE.md) - Original WordPress structure
- [Blog Templates Guide](./guides/TEMPLATE_DEVELOPMENT_GUIDE.md) - Current blog implementation

## Maintenance

### Adding New Redirects

If new WordPress archive patterns are discovered:

1. Add redirect rule to `.htaccess` (after line 187, before blog routes)
2. Test with `v2/scripts/test-wordpress-redirects.php`
3. Update this documentation
4. Monitor Google Search Console

### Removing Redirects

If redirects need to be removed (not recommended):

1. Remove rules from `.htaccess` (lines 189-207)
2. Test that archive URLs return 404 or serve content
3. Update this documentation

## Changelog

**2026-01-18:**
- Initial implementation of WordPress archive redirects
- Added redirect rules for author archives (12 URLs)
- Added redirect rules for date archives (19 URLs)
- Created test script for validation
- Documented redirect patterns and SEO rationale
