| Status code | 302 |
|---|---|
| Status text | Found |
| Category | 3xx Redirection |
| Response has body | Usually |
| Specification | RFC 9110 |
What does 302 Found mean?
The resource is temporarily at a different URL, but future requests should still use the original. It belongs to the 3xx Redirection class, which means further action is needed to complete the request, usually following a different URL.
When do APIs return 302?
Temporary redirects, login flows, and A/B routing.
How to fix a 302 Found
Keep using the original URL. Note that many clients incorrectly turn a POST into a GET when following a 302 — use 307 if you need the method preserved.
Reproduce a 302 response
The fastest way to understand a status code is to trigger one and read the full response. Open the
API tester and send a request to https://httpbin.org/status/302 — you will
see the 302 status along with every response header the server sent. Comparing those headers against
a working request is often what reveals the cause.
When you are debugging a real endpoint, check the response headers as carefully as the body, and confirm you are using the right HTTP method for the operation.
Related 3xx status codes
300 Multiple Choices
The resource has more than one representation, and the server is leaving the choice to the client.
301 Moved Permanently
The resource has permanently moved to the URL in the Location header.
303 See Other
The response to the request can be found at another URL, and should be retrieved with GET.
304 Not Modified
The cached copy the client already has is still valid, so no body is sent.
307 Temporary Redirect
Like 302, but the HTTP method and body must be preserved when following the redirect.
308 Permanent Redirect
Like 301, but the method and body must be preserved.
302 Found FAQ
What is the difference between 302 and 307?
Both are temporary redirects. 307 guarantees the method and body are repeated unchanged at the new URL, while a 302 allows clients to change a POST into a GET, and most do.
Is a 302 redirect bad for SEO?
Not when the move really is temporary. A 302 tells search engines to keep the original URL indexed, so using it for a permanent move delays the new URL replacing the old one. Use 301 or 308 for permanent moves.
Why does my API client show 302 instead of the final response?
Because it is not following redirects. The 302 response carries a Location header with the next URL; either request that URL or turn on redirect following, which in curl is the -L flag.
See also
- 301 Moved Permanently — The resource has permanently moved to the URL in the Location header.
- 307 Temporary Redirect — Like 302, but the HTTP method and body must be preserved when following the redirect.
References
- RFC 9110, 302 Found — The specification that defines this status code.
- MDN: 302 Found — MDN's reference page for this status code.