All systems operational
← All articles

301 vs 302 vs 307 vs 308 Redirects: A Practical Comparison

Understand permanent and temporary HTTP redirects, method preservation, and the status codes to consider when moving pages or managing short links.

MD
Team
Oct 2026

Understand permanent and temporary HTTP redirects, method preservation, and the status codes to consider when moving pages or managing short links.

Not every redirect means the same thing. HTTP provides several status codes for moving visitors from one URL to another, and choosing the wrong one can affect browser behavior, caching, and how search engines interpret a move.

What is an HTTP redirect?

A server can respond to a request with a 3xx status code and a Location header. The browser then makes another request to the location provided. Redirects are used for website migrations, changed article addresses, campaign links, and URL shortening.

Redirect status codes at a glance

CodeMeaningTypical useMethod behavior
301Moved PermanentlyPermanent URL changeSome clients change POST to GET
302FoundTemporary moveSome clients change POST to GET
307Temporary RedirectTemporary move preserving request methodMethod preserved
308Permanent RedirectPermanent move preserving request methodMethod preserved

301: a permanent location

Use a 301 when an old URL has permanently moved to a new address. Typical examples include consolidating duplicate URLs or changing the path of a published page. Search engines generally treat this as a strong signal that the new address should replace the old one.

302: a temporary location

Use a 302 when a move is not intended to be permanent. A short-link service may use temporary redirects when the owner might change the target later. However, a short-link provider's choice of redirect status alone does not tell you whether a destination will remain fixed.

307 and 308: preserving methods

When request methods and bodies matter, the distinction becomes important. A 307 or 308 tells the client to preserve the original request method when following the redirect. This can be significant for API requests and submitted forms.

For ordinary links opened in a browser, the request is usually GET, so method preservation often makes no visible difference to a visitor. Do not redirect sensitive form submissions to an untrusted host.

What does Google recommend?

Google Search Central describes 301 and 308 as permanent redirects and 302 and 307 as temporary signals. For a genuine site move, Google recommends server-side permanent redirects where possible. A redirect does not replace the need for accurate destination content and clean canonical signals.

How to test a redirect

Inspect the response rather than guessing based on what a browser shows:

curl -I https://example.com/old-page

An example response might contain:

HTTP/2 301
location: https://example.com/new-page

To inspect each hop, use curl -IL as a convenient first check. Some sites do not support HEAD reliably, so test GET behavior where appropriate.

Common mistakes

  • Using a temporary redirect for a permanent domain migration.
  • Creating a chain of several avoidable redirects.
  • Redirecting every deleted page to the homepage regardless of relevance.
  • Assuming a 301 will instantly transfer all search signals.
  • Changing methods unexpectedly during API requests.

Frequently Asked Questions

Is 301 always better for SEO?

No. The correct status depends on whether the move is permanent. Misrepresenting a temporary move as permanent can confuse systems that cache or index the URL.

Should all URL shorteners use 301?

Not necessarily. Editable campaign links and permanent aliases can have different operational requirements.

Conclusion

Choose a redirect code based on the intended lifetime of the destination and whether request methods need to be preserved. Test your implementation, document the choice, and keep redirect chains short.

Sources

Google Search Central: Redirects and Google Search · MDN: Redirections in HTTP.