Back to blog
Redirect Chain Analyzer10 min readApril 18, 2026

301 vs 302 vs 307 vs 308 Redirects: Guide with Real Use Cases

When should you use a 301 and when a 302? What is the difference between a 307 and a 308? This guide resolves each scenario with a practical decision table.


The 301 and 302 are the best-known redirect types in SEO, but they are not the only ones. The HTTP protocol also defines 307 and 308, which handle situations that 301 and 302 do not cover correctly. Choosing the wrong type can cost you rankings, cause problems with forms, or generate contradictory signals for Google. This guide explains each type, when to use it, and how to audit them.

What is an HTTP redirect?

An HTTP redirect is a server response that tells the browser (and crawlers) that the requested resource is located at another URL. The server returns a 3xx status code along with a Location header that specifies the new URL.

From an SEO perspective, redirects serve two main functions: preserving content accessibility when a URL changes, and transferring ranking signals (PageRank, link authority) to the new URL.

301 Redirect — Permanent Move

The 301 code indicates that the resource has permanently moved to the URL specified in the Location header. Browsers and search engines should update their references to use the new URL in the future.

  • PageRank transfer: Google passes virtually all accumulated PageRank to the destination URL.
  • The browser can cache the redirect, meaning on future visits it goes directly to the destination without consulting the server.
  • Google removes the source URL from its index and replaces it with the destination URL over time.
  • Does not preserve HTTP method: a POST to a URL with a 301 may become a GET at the destination (standard behavior in modern browsers).

When to use 301: permanent URL change due to redesign, domain migration, consolidating www/non-www versions, HTTP→HTTPS migration, removing pages with content consolidated in another URL.

302 Redirect — Temporary Move

The 302 code indicates that the resource has temporarily moved. The original URL remains the "official" URL and the browser should not update it. In practice, many browsers treat 302 like 301 (converting it to GET), which caused confusion and led to the creation of 307.

  • Google generally does not transfer PageRank permanently — it keeps the source URL in the index.
  • The browser does not cache the 302 (or caches it with a short TTL), so it consults the server on each visit.
  • Correct when the redirect is genuinely temporary and the original URL will be active again.
  • Incorrect when used as a substitute for 301 out of convenience — Google may take months to decide which URL to consolidate.

Common mistake: using 302 to redirect HTTP to HTTPS or www to non-www. This causes Google to keep both versions in the index, generating duplicate content. Always use 301 for these cases.

307 Redirect — Temporary Move with Method Preserved

The 307 is the "correct" version of 302 from an HTTP protocol perspective. The key difference is that 307 guarantees that the original HTTP method (GET, POST, PUT…) is preserved in the request to the destination.

If a user submits a form (POST) to a URL that responds with 307, the browser will resend the same POST to the destination. With a 302, the behavior was not specified in HTTP/1.0 and most browsers converted it to GET, losing the form data.

When to use 307: temporary redirects affecting routes that receive POST or PUT requests (APIs, forms). Server maintenance where the endpoint will be available again. Short-duration A/B testing with form traffic.

308 Redirect — Permanent Move with Method Preserved

308 is to 301 what 307 is to 302: a permanent move that guarantees HTTP method preservation. The browser caches the redirect (like 301) and preserves the original request method (like 307).

In pure SEO contexts (web pages with GET), the difference between 301 and 308 is irrelevant. 308 makes sense primarily in RESTful APIs where permanently moving an endpoint should not change the HTTP method of incoming requests.

Comparison table of all 4 redirect types

CodeTypeMethod preservedCacheableTransfers PageRankPrimary use case
301PermanentNo (GET by default)YesYes (virtually all)Migrations, permanent URL changes
302TemporaryNo (GET by default)NoNot permanentlyGenuinely temporary redirects
307TemporaryYesNoNot permanentlyAPIs, temporary POST forms
308PermanentYesYesYesREST APIs with permanent endpoint moves

Real use cases: which type to use in each situation

Full domain migration

Use 301 for all URLs. Redirect old-example.com to new-example.com with page-by-page 301 redirects where possible (1-to-1), or with wildcard rules for the rest. Never use 302 in a domain migration — Google will take much longer to consolidate the signals.

HTTP to HTTPS migration

Use 301 from http:// to https://. Make sure the redirect happens at the server level (not via meta refresh) and goes directly to the HTTPS URL without passing through the www/non-www version first (to avoid chains).

Landing page A/B testing

Use 302 (or 307 if there are forms). The test is temporary — the original URL will be the destination again when the test ends. Using 301 would cause Google to consolidate PageRank in the test variant instead of the original URL.

Page removal with content consolidation

Use 301 toward the most thematically relevant page. If no relevant page exists to redirect to, a 404 is preferable to an irrelevant redirect — Google may penalize redirects that lead to content unrelated to the source URL.

Planned server maintenance (downtime)

Use 302 or 307 toward a "under maintenance" page. 307 is preferable if the page has forms. Never use 301 for maintenance — Google will start consolidating PageRank in the maintenance page.

Consolidating www and non-www versions

Use 301 toward the chosen canonical version. Also define which version is preferred in Google Search Console (Settings → Preferred domain). Consistency between the server 301 and the GSC setting avoids contradictory signals.

Common mistakes when implementing redirects

  1. 1.Using 302 when the intent is permanent. The most frequent mistake. If you don't plan to revert the change, always use 301.
  2. 2.Creating redirect chains. Each new redirect should point directly to the final destination, not to another URL that itself redirects.
  3. 3.Redirecting to an irrelevant URL. A 301 from /products/shoes to /home loses all accumulated ranking value. Always redirect to the most relevant content.
  4. 4.Not updating internal links. After creating redirects, update internal links to point directly to the destination. This reduces crawler work and prevents obsolete redirects from accumulating.
  5. 5.Bulk-redirecting 404 pages to the homepage. This practice was widespread years ago. Google considers it a "soft 404" and does not transfer PageRank.

How to verify the redirect type of any URL

You can verify which HTTP code any URL returns and follow the entire redirect chain with iRankly's Analyzer. The tool shows the code of each hop, the time per hop, and whether the redirect is permanent or temporary, allowing you to detect incorrect uses of 302 where a 301 should be used.

Try the tool for free

Redirect Chain AnalyzerAnalyze your URLs with {tool} by iRankly. No sign-up, no credit card.

Use tool for free

Try the tool for free

Analyze your URLs with Redirect Chain Analyzer by iRankly. No sign-up, no credit card.

Use tool for free