The Difference Between 301 and 302 Redirects

Covers permanent versus temporary moves, plus 308 and 307, which preserve the method.

301 Moved Permanently means the resource has moved to a new URL permanently. Search engines take this signal and transfer the old URL's ranking and link equity to the new URL. Use it for moves you won't undo, such as a domain migration or an HTTP-to-HTTPS switch.

302 Found is a temporary move. The original URL is still valid, so search engines do not move the ranking. It suits situations that will soon revert, such as a temporary detour to a maintenance page or a redirect after login.

One caveat is method preservation. Historically, browsers sometimes changed POST to GET with 301 and 302. If you must keep the method, use 308 for a permanent move and 307 for a temporary one, and use 303 See Other when sending the user to a result page after a POST.