What 302 means
The resource is temporarily at the URL in the Location header. The client should keep using the original URL in future.
When servers send it
For short-term moves, login redirects, A/B tests, and many frameworks’ default redirect().
Why you might see it
- A redirect rule or application code that issues a temporary redirect.
- An authentication check sending you to the login page.
Using it as a developer
- Browsers change POST to GET when following a 302 (historical behaviour the spec now allows). If you need the method and body kept, use 307.
- After a form POST, 303 says “go and GET this page” more precisely than 302.
- If the move is permanent, use 301 or 308 so search engines update their index.
If you’re visiting a website
- Nothing. Your browser follows it automatically.
Related codes
- 301 Moved Permanently: The page has moved for good to the URL in the Location header.
- 303 See Other: Go and GET the URL in the Location header, typically after submitting a form.
- 307 Temporary Redirect: The page is temporarily at the URL in the Location header. Repeat the same request there, with the same method and body.
- 308 Permanent Redirect: The page has moved for good. Repeat the same request at the new URL, with the same method and body.
Where it’s defined
302 Found is defined in RFC 9110, section 15.4.3. It’s a 3xx code, the redirection class: look somewhere else, or use the copy you already have.
Other 3xx codes
301 Moved Permanently · 303 See Other · 304 Not Modified · 307 Temporary Redirect · 308 Permanent Redirect
Or search them all in the HTTP status code list.