DevKits
302

Found

3xx Redirection

Last updated:

The resource is temporarily at a different URL. The client should continue to use the original URL for future requests.

Description

Historically ambiguous about method preservation, which is why 307 and 308 were introduced. In practice, most clients treat 302 as 'redirect via GET', so 307 is preferred when the method must be preserved.

When to use

Use 302 for temporary redirects such as post-login redirects or A/B testing routes.

Specification

RFC 9110 §15.4.3

Examples

HTTP response
HTTP/1.1 302 Found
Content-Type: application/json

Location: /new-url
Node.js (Express)
res.status(302).redirect("/new-url");
Go (net/http)
w.WriteHeader(http.StatusFound)
Python (Flask)
return jsonify({"error": "Found"}), 302

Related status codes

All 3xx codes