Redirects

What are Redirects?

Redirects are HTTP status codes that inform browsers and search engines that a URL has been moved to a new address. They are essential for SEO-safe website migrations, URL changes, and maintaining link power.

Redirect Type
Status Code
Link Power
Use Case
301 (Permanent)
301
99%
Domain migrations, URL changes
302 (Temporary)
302
0%
A/B tests, maintenance
307 (Temporary)
307
0%
Temporary, preserves HTTP method
308 (Permanent)
308
99%
Permanent, preserves HTTP method
Meta-Refresh
200
0%
Not recommended for SEO

Redirect Types in Detail

301 Redirects (Permanent)

301 redirects signal to search engines that a URL has been permanently moved to a new address. They transfer 99% of link power and are the gold standard for SEO migrations.

Use Cases:

  • Domain migrations
  • URL structure changes
  • Content migrations
  • HTTPS migration

302 Redirects (Temporary)

302 redirects indicate that a URL has been temporarily moved to another address. They do not transfer link power and should only be used for short-term redirects.

Use Cases:

  • A/B tests
  • Maintenance work
  • Temporary landing pages

307 and 308 Redirects

  • 307: Temporary, preserves HTTP method
  • 308: Permanent, preserves HTTP method

Redirect Mapping Strategies

1. 1:1 Mapping

Each old URL is mapped exactly to one new URL. This is the cleanest method, but not always practical.

Advantages:

  • Clear structure
  • Easy tracking
  • Maximum SEO control

2. Category Mapping

Multiple similar URLs are consolidated into a category page.

Example:

/old-product-1/ → /products/category-a/
/old-product-2/ → /products/category-a/
/old-product-3/ → /products/category-b/

3. Wildcard Mapping

Dynamic URLs are redirected using patterns.

Example:

/blog/* → /articles/*
/shop/category/* → /products/*/category/*

Avoiding Redirect Chains

Redirect chains occur when one redirect points to another redirect. This can lead to performance issues and link power losses.

Common Chain Scenarios

  1. A → B → C: Old URL redirects to intermediate URL, which in turn redirects to final URL
  2. Meta-Refresh Chains: Multiple meta-refresh tags in sequence
  3. JavaScript Chains: Multiple JavaScript redirects

Chain Detection Methods

Method
Tool
Accuracy
cURL with Follow-Location
Terminal/Command Line
High
Screaming Frog
SEO Spider
Very High
Google Search Console
Coverage Report
Medium
Online Redirect Checker
Web-based
Medium

Server Configuration

Apache (.htaccess)

# 301 Redirect
Redirect 301 /old-page/ /new-page/

# 302 Redirect
Redirect 302 /temporary/ /maintenance/

# Wildcard Redirect
RedirectMatch 301 ^/blog/(.*)$ /articles/$1

# Domain Redirect
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]

Nginx

# 301 Redirect
location /old-page/ {
    return 301 /new-page/;
}

# Domain Redirect
server {
    server_name olddomain.com;
    return 301 https://newdomain.com$request_uri;
}

PHP Redirects

<?php
// 301 Redirect
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://example.com/new-page/");
exit();
?>

Important: Avoid meta-refresh for SEO-critical redirects. They are not recognized by search engines as real redirects.

Testing and Validation

1. Check HTTP Status Code

curl -I https://example.com/old-page/
# Expected: HTTP/1.1 301 Moved Permanently

2. Validate Final URL

curl -L https://example.com/old-page/
# Should redirect to correct target URL

3. Test Link Power Transfer

  • Google Search Console: Check Coverage Report
  • Ahrefs/SEMrush: Monitor backlink transfer
  • Perform PageRank simulations

Redirect Testing Checklist

  • Check status code
  • Validate target URL
  • Perform chain detection
  • Conduct mobile test
  • Measure speed
  • Check GSC integration
  • Monitor backlink transfer
  • Test user experience

Common Redirect Errors

1. Wrong Status Codes

  • 302 instead of 301 for permanent migrations
  • 200 instead of 301 for URL changes
  • Missing status codes

2. Redirect Loops

  • A → B → A circles
  • Wildcard conflicts
  • Server configuration errors

3. Lost Parameters

  • UTM parameters are lost
  • Session IDs are not transferred
  • Query strings are truncated

4. Mobile vs. Desktop Inconsistencies

  • Different redirects for different user agents
  • Responsive design issues
  • Touch vs. desktop URLs

Monitoring and Maintenance

1. Google Search Console

  • Coverage Report for redirect errors
  • URL Inspection Tool for individual tests
  • Performance monitoring for target URLs

2. Analyze Server Logs

  • 404 errors after redirect implementation
  • Crawl budget optimization
  • User-agent specific issues

3. Backlink Monitoring

  • Ahrefs/SEMrush for link transfer
  • Identify lost backlinks
  • New backlinks to target URLs

Best Practices for SEO-Safe Redirects

1. Planning

  • Create complete URL list
  • Prefer 1:1 mapping
  • Use wildcards sparingly

2. Implementation

  • 301 for permanent changes
  • Avoid chains
  • Prefer server-level redirects

3. Testing

  • Manually test all redirects
  • Use automated tools
  • Check mobile and desktop

4. Monitoring

  • Regularly monitor GSC
  • Minimize 404 errors
  • Keep an eye on performance

Important: Redirects are not a one-time task. Regular monitoring and adjustments are essential for long-term SEO success.

Last updated: October 21, 2025