302 Found

HTTP 302 status code means a target resource has temporarily moved to a different URL indicated in the Location header.

Unlike with 301 and 307 status codes, 302 signals to clients to not update their links and keep hitting this endpoint.

HTTP/2 302 Found
Location: https://example.com/new

POST requests

Like with 301 Moved Permanently, some browsers have been incorrectly converting POST requests to GET requests upon encountering 302 status code. In such cases, POST data is discarded during a redirect. It goes against the HTTP spec, which states that the client should repeat the request with the same method and body.

If you want to be sure that the request will be retried with the same method and body, use 307 Temporary Redirect.

Request Method Permanent Temporary
Can change from POST to GET 301 302
Can’t change from POST to GET 308 307

Search engines

Upon encountering 302, search engines will not replace the page from their indexes, and this status code doesn’t pass the domain authority to a new page. Consider using 301 Moved Permanently if you want to move a URL to a new location.

Redirects have performance implications, which might negatively impact search engine rankings.

Interested in no-nonsense technical guides?

No spyware, no promotional emails, or keyword-stuffed junk. I will only send you a single email when I've got something interesting to say. Unsubscribe anytime.

You can also subscribe to the Atom feed (it's like RSS, but better).