SEO June 23, 2026 · 9 min read

301 vs 302 Redirects: The Complete SEO Guide

Redirects seem simple until something goes wrong — a site migration that tanks rankings, a redirect chain that slows page load, or a temporary redirect that accidentally becomes permanent. This guide covers every redirect type, how each one affects SEO, and the most common mistakes that hurt rankings.

What is an HTTP redirect?

When a server returns a 3xx status code, it's telling the browser: "the content you're looking for isn't here anymore — go to this other URL." The browser follows the redirect automatically, and users typically see only the final destination.

For SEO, what matters is whether the redirect passes link equity (PageRank) from the old URL to the new one, and whether the signal is permanent or temporary.

301 vs 302: the core difference

CodeTypePageRank passedBrowser caches?Use when
301PermanentYes (~99%)YesPage moved permanently — site migrations, URL restructuring, HTTPS redirects
302TemporaryPartial / unclearNoPage temporarily unavailable — A/B tests, maintenance, geo-redirects
307Temporary (strict)PartialNoSame as 302 but method-preserving (POST stays POST)
308Permanent (strict)YesYesSame as 301 but method-preserving

The practical rule: use 301 for permanent moves, use 302 for temporary situations. If you're unsure, default to 301.

How 301 redirects affect SEO

A 301 redirect signals to Google that the old URL has permanently moved to the new one. Google consolidates ranking signals — backlinks, anchor text, historical performance — from the old URL to the new one. This process isn't instant; it typically takes a few weeks to several months depending on crawl frequency.

Key things to know:

  • Google passes approximately 99% of PageRank through a 301 — the small loss is negligible
  • Redirect chains (A → B → C) lose more equity with each hop — keep chains to a maximum of one redirect
  • Redirecting to a page with different content is fine if the intent matches — redirecting a blog post to the homepage is not
  • Google recrawls redirected URLs periodically — changing a 301 back to its original URL is possible but takes time to settle

How 302 redirects affect SEO

Google's handling of 302 redirects has become more sophisticated over time, but the general principle still applies: a 302 means temporary, so Google keeps the original URL indexed rather than the destination. Link equity passes but the old URL remains the canonical in Google's eyes.

The common mistake: using 302 when you mean 301. This happens frequently with default framework behavior (some frameworks default to 302), CMS plugins that don't specify redirect type, and CDN rules set up without specifying permanence.

↪️
Check your redirect chains free
Trace every redirect hop with status codes, response times, and final destination. See exactly where redirect chains are losing SEO equity.
Check redirects →

Redirect chains: the silent SEO killer

A redirect chain happens when a URL redirects to another URL that also redirects — creating a chain of hops before the browser reaches the final destination.

301old-url.com/page 302old-url.com/new-page 301new-url.com/page final-destination.com/page

Redirect chains cause three problems:

  1. PageRank dilution — each additional hop reduces the link equity passed to the final URL
  2. Slower page load — each redirect adds 100-500ms of latency (a round trip to the server)
  3. Crawl budget waste — Googlebot spends crawl budget following chains instead of discovering new content

The fix: update each redirect to point directly to the final destination. If you have a chain A → B → C, change A to redirect directly to C.

Redirect loops

A redirect loop happens when URL A redirects to URL B which redirects back to URL A. Browsers detect this after a few hops and show an error ("Too many redirects"). Common causes:

  • Forcing HTTPS when the SSL certificate isn't configured correctly
  • WordPress plugins conflicting with Nginx/Apache redirect rules
  • Reverse proxy rules that redirect the same request twice
  • CDN rules that contradict origin server rules

HTTP to HTTPS redirect: do it right

Every site should redirect HTTP to HTTPS with a 301. The correct Nginx configuration:

server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://example.com$request_uri;
}

Common mistakes with HTTPS redirects:

  • Redirecting http:// to https://www. then having a separate www to non-www redirect — this creates a chain. Collapse it to one redirect.
  • Using 302 instead of 301 for the HTTP→HTTPS redirect — use 301.
  • Not setting HSTS after the HTTPS redirect — add an HSTS header so browsers remember to use HTTPS directly.

www to non-www (or vice versa)

Pick one and redirect the other permanently with a 301. Both versions being accessible without a redirect creates a duplicate content issue — Google sees them as separate URLs with the same content.

# Redirect www to non-www in Nginx
server {
    listen 443 ssl;
    server_name www.example.com;
    return 301 https://example.com$request_uri;
}

Site migrations: redirecting an entire domain

When migrating from one domain to another, you need 301 redirects from every old URL to its corresponding new URL. The worst approach: redirecting everything to the homepage. Google sees this as a soft 404 and won't transfer ranking signals.

Best practice for site migrations:

  1. Map old URLs to new URLs in a spreadsheet (1:1 where possible)
  2. Implement 301 redirects at the server level, not via JavaScript
  3. Submit the new sitemap in Google Search Console immediately after launch
  4. Use the redirect checker to verify every important URL is redirecting correctly and there are no chains
  5. Monitor Search Console for crawl errors and ranking changes for 60-90 days

How to check your redirects

Use InfiniUm's Redirect Checker to trace the full redirect chain for any URL. It shows every hop with its HTTP status code, the redirect target, and the final destination — so you can spot chains, loops, and wrong redirect types instantly.

You can also check redirects via curl in the terminal:

# Follow all redirects and show headers at each hop
curl -L -I -s https://old-url.com/page | grep -E "HTTP|Location"
↪️
Free Redirect Chain Checker
Trace every 301, 302, 307, and 308 redirect hop for any URL. See status codes, redirect targets, and final destination instantly.
Check redirects free →