What HTTP 302 means
The resource is temporarily somewhere else, and the client should keep using the original URL in future. It is commonly used after login, for A/B tests, and for maintenance pages. Like 301, browsers turn POST into GET when following it, which is why 303 and 307 were added to make the behaviour explicit.
Using 302 correctly
- Use 303 to redirect after a form POST, and 307 when the method and body must be kept.
Retrying
Not applicable: this isn’t an error.
Example response
HTTP/1.1 302 Found
Date: Wed, 21 Oct 2026 10:30:00 GMT
Location: /login?next=%2Fdashboard
How to return 302
res.redirect(302, '/new-path');
from fastapi.responses import RedirectResponse
return RedirectResponse("/new-path", status_code=302)
http.Redirect(w, r, "/new-path", http.StatusFound)
location /old-path {
return 302 /new-path;
}
Related status codes
- 301 Moved Permanently : The resource has a new permanent URL, given in the Location header.
- 303 See Other : Redirects the client to another URL, which it should fetch with GET.
- 307 Temporary Redirect : A temporary redirect that keeps the original method and body.
Other 3xx status codes
300 Multiple Choices · 301 Moved Permanently · 303 See Other · 304 Not Modified · 307 Temporary Redirect · 308 Permanent Redirect
See the full list of HTTP status codes.
Sources
Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.
Frequently asked questions
What does HTTP 302 Found mean?
HTTP 302 Found is a temporary redirect to the URL in the Location header. The resource is temporarily somewhere else, and the client should keep using the original URL in future. It is commonly used after login, for A/B tests, and for maintenance pages. Like 301, browsers turn POST into GET when following it, which is why 303 and 307 were added to make the behaviour explicit.