Back to httpstatuses.net

301 vs 302 vs 307 vs 308 Redirects

Choose redirect status codes by two questions: is the move permanent, and must the client preserve the original method and body?

Status codes in this guide

Quick comparison

CodePermanent?Method preserved?Typical use
301YesNot reliably for non-GET requestsPermanent page moves and canonical URLs.
302NoNot reliably for non-GET requestsTemporary browser redirects.
307NoYesTemporary API redirects or uploads.
308YesYesPermanent API redirects.

Questions

Which redirect should I use for SEO?

Use 301 or 308 for permanent moves, then update internal links and sitemaps to the final URL.

Which redirect is safest for POST requests?

Use 307 for temporary moves and 308 for permanent moves when the method and body must be preserved.


HTTP status code lookup
By Ping Now, a website/API/service uptime monitor
Data from Wikipedia