302 Found
The resource is temporarily at a different URL, given in the Location header.
| Class | Redirection (3xx) |
|---|---|
| Defined in | RFC9110, Section 15.4.3 |
| Cacheable by default | No, unless explicit freshness headers allow it |
Common causes
- A temporary redirect, such as sending users to a login page and back.
- Frameworks often default to 302 for redirects.
What to do
Use 302 only when the move is temporary. For a permanent move use 301 or 308. If the method must be preserved on redirect, use 307.
Related codes
- 301 Moved Permanently: The resource has moved permanently to the URL in the Location header.
- 303 See Other: Look at another URL with a GET request to see the result, typically after a POST.
- 307 Temporary Redirect: Temporary redirect that keeps the original method and body.