302 Found
The resource temporarily resides at a different URL; clients should keep requesting the original URL in the future.
Defined in RFC 9110 §15.4.3
What 302 means
A 302 response indicates the target resource temporarily resides at a different URL, given by the Location header. Because the move is temporary, the client is expected to keep using the original request URL for future requests rather than updating any stored links, which is the defining difference from 301. RFC 9110 calls this out explicitly: user agents must not automatically change the request method to GET unless it already knows the response, in practice, causes that behavior in deployed clients.
That last clause exists because 302 has a long, messy history. The original HTTP/1.0 specification did not clearly say whether the method should be preserved, and virtually every browser ever built responds to a 302 on a POST by re-requesting the Location with a GET and no body. This is now such an entrenched convention that servers must treat 302 as effectively GET-only for non-idempotent requests, exactly like 301, even though the RFC text nominally allows otherwise; 307 was introduced specifically to fix this ambiguity.
A classic real-world pattern is the post/redirect/get flow: a form submits via POST, the server processes it, and responds with a 302 to a confirmation or resource page. Following the redirect issues a GET, so refreshing the resulting page does not resubmit the form. 302 is also the workhorse of login walls, load-balancer failover, and short-lived promotional redirects, anywhere the destination might change again soon.
Unlike 301, browsers generally do not cache a 302 for long unless the response carries explicit caching headers (Cache-Control, Expires), because the semantics say the redirect is temporary. Search engines similarly keep indexing the original URL rather than transferring ranking signal to the target, which is why 302 is the wrong choice for a permanent site migration and 301 or 308 should be used instead.
Common causes
- A resource is temporarily unavailable at its usual URL and traffic is being routed elsewhere (maintenance, A/B test, geolocation).
- A post/redirect/get pattern sends the client to a confirmation page after a form submission.
- A load balancer or reverse proxy fails over to a backup origin without changing the canonical URL.
- An authentication wall redirects unauthenticated users to a login page and back.
- A web framework’s default redirect() helper returns 302 unless a different status is explicitly requested.
How to fix a 302
If you are the client (browser user or API caller)
- Continue using the original request URL for future requests; do not permanently rewrite links based on a 302 Location.
- For POST, PUT, or DELETE requests, expect the redirected request to arrive as a GET with no body in most real-world clients, and design the flow accordingly.
- Respect any Cache-Control headers on the response rather than assuming the redirect target is stable long-term.
- When writing an HTTP client, expose the redirect chain (or at least the final URL) to calling code, since silently following 302s can mask unexpected destination changes.
If you run the server
- Use 302 only for genuinely temporary redirects; switch to 301 or 308 once a move becomes permanent.
- If the request method and body must survive the redirect, return 307 instead of 302 to avoid the historical GET-downgrade behavior.
- Set Location to an absolute URL and avoid redirect chains that bounce through several intermediate 302s.
- Add Cache-Control: no-cache or a short max-age so intermediaries and browsers do not cache the redirect longer than intended.
Example
POST /login HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
username=alice&password=secret
HTTP/1.1 302 Found
Location: https://example.com/dashboard
GET /dashboard HTTP/1.1
Host: example.comTry it live
Our free status responder returns a real HTTP 302 you can point tests, monitors or a browser at.
GET https://mcp.httpstatus.com/status/302