All Guides
SEO + Discoverability

Manage Redirects

Use redirects to change URLs effectively while maintaining SEO value and user experience.

What this covers: Redirect types (301, 302, 307, 308), implementation on Apache, Nginx, WordPress, Vercel, and Netlify, plus common scenarios like domain changes, HTTPS migration, and trailing slash normalization.

Who it’s for: Site owners and developers who need to change URLs during a migration, restructure, or domain change without losing search rankings or breaking bookmarks.

Key outcome: You’ll have proper 301 redirects in place for all changed URLs, with no redirect chains or loops, verified using curl or a redirect checker tool.

Time to read: 5 minutes

Part of: SEO & Discoverability series

Change URLs without losing SEO. Here’s the redirect cheat sheet.

Redirects preserve SEO value and user experience when you move or rename pages.

Redirect Types

This guide covers the necessary steps and common pitfalls. Follow it systematically and you’ll avoid the mistakes that cause most problems.

Each type serves a different purpose.

Code Type When to Use SEO Impact
301 Permanent URL changed forever Passes ~significant link equity
302 Temporary URL will come back Doesn’t pass equity
307 Temporary (HTTP/2) Same as 302, preserves method Doesn’t pass equity
308 Permanent (HTTP/2) Same as 301, preserves method Passes equity

Rule: Use 301 for permanent moves. Use 302 only for A/B tests or maintenance.

How to Add Redirects

These mistakes are common because they’re easy to make and their consequences aren’t immediately obvious. Avoid them proactively.

Apache (.htaccess)


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

# Pattern redirect
RedirectMatch 301 ^/blog/(.*)$ /articles/$1

# Regex redirect
RewriteEngine On
RewriteRule ^old-section/(.*)$ /new-section/$1 [R=301,L]

Nginx


# Single redirect
rewrite ^/old-page$ /new-page permanent;

# Pattern redirect
rewrite ^/blog/(.*)$ /articles/$1 permanent;

# In server block
location = /old-page {
 return 301 /new-page;
}

WordPress (Plugin)

Use Redirection plugin. No code needed.

Vercel (vercel.json)


{
 "redirects": [
 { "source": "/old", "destination": "/new", "permanent": true }
 ]
}

Netlify (_redirects)


/old-page /new-page 301
/blog/* /articles/:splat 301

Common Scenarios

Redirect management prevents broken links and preserves search engine value when URLs change, which happens during site migrations, content reorganization, and URL structure updates. Poor redirect handling causes both user frustration and SEO damage that can take months to recover from.

Changing Domain


RewriteEngine On
# Redirect all of old domain to new
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]

HTTP to HTTPS


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

www to non-www


RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Trailing Slash Consistency


RewriteEngine On
# Remove trailing slashes (choose ONE of these two)
RewriteRule ^(.+)/$ /$1 [R=301,L]

# OR: Add trailing slashes (do NOT use both)
# RewriteRule ^(.+[^/])$ /$1/ [R=301,L]

Redirect Chains

Bad: A → B → C → D (chain of 3+ redirects)

Good: A → D (single redirect)

Each redirect loses some SEO value and adds latency. Audit and flatten chains.

Testing Redirects


# Check redirect with curl
curl -I https://example.com/old-page

# Follow redirects and show chain
curl -IL https://example.com/old-page

Common Redirect Mistakes

Avoid these—they cause most of the problems.

  • Using 302 instead of 301 for permanent moves
  • Creating redirect loops (A → B → A)
  • Forgetting trailing slash variations
  • Not updating internal links (still pointing to old URLs)
  • Leaving redirects forever (clean up after a year)

Test Every Redirect Chain

Audit your existing redirects. Use Screaming Frog to find chains and loops.

Sources

Redirect Management Questions Answered

What is the difference between a 301 and 302 redirect?

A 301 redirect signals a permanent move and transfers 90-99% of link equity to the new URL. A 302 redirect signals a temporary move and does not transfer link equity. Use 301 for all permanent URL changes; use 302 only for truly temporary situations like A/B tests or maintenance pages.

How many redirects is too many?

Avoid redirect chains longer than 2 hops. Google follows up to 10 redirects but each hop adds latency (50-100ms per redirect) and dilutes link equity. Audit your redirects quarterly and collapse chains so every old URL points directly to its final destination.

Do redirects hurt page speed?

Each redirect adds 50-300ms of latency depending on server response time and whether the redirect is same-origin or cross-origin. A single redirect is acceptable for canonical URL normalization (e.g., non-www to www), but avoid unnecessary chains, especially for above-the-fold resources.

How long should you keep redirects in place?

Keep 301 redirects active for a minimum of 1 year, and indefinitely if the old URL had significant backlinks or search traffic. Removing redirects too soon causes 404 errors that destroy accumulated link equity and strand users who bookmarked or linked to the old URL.

✓ Testing Your Redirect Rules

  • Old URLs redirect to new URLs (test by visiting the old URL)
  • Redirects are 301 (permanent), not 302 (temporary) – check with a redirect checker tool
  • No redirect chains (A→B→C should be A→C directly)

Test: Use httpstatus.io or Redirect Checker to verify each redirect returns 301 and lands on the correct page.