302 Found
The resource is temporarily at a different URL. The original URL stays authoritative and should keep being used for future requests.
At a glance
- Status code
- 302 Found
- Class
- 3xx, redirection, further action is needed to complete the request
- Defined in
- RFC 9110
- Cacheable by default
- by explicit headers only
- Response body
- Optional.
In detail
302 says this request should go elsewhere, but do not update your bookmarks. It is the default redirect emitted by most frameworks, which is why it is so common.
Right for a temporary detour: maintenance pages, A/B routing, post-login bounces. Wrong for a permanent move, where it withholds the ranking transfer a 301 would give.
If a redirect is meant to be permanent, change it to 301 or 308. Search engines will eventually treat a long-lived 302 as permanent, but not quickly and not reliably.
Examples
HTTP/1.1 302 Found
Location: /maintenance
Cache-Control: no-storeThings that catch people out
- In practice clients rewrite POST to GET when following 302, which contradicts the specification but is now required behaviour for compatibility. Use 303 or 307 to say what you actually mean.
- A 302 to a login page for an API request breaks clients that expected 401. The redirect turns an authentication failure into a confusing HTML response.
Try it: HTTP Request Builder
Build a request with any method, headers and body, send it, and read the status line the server returns.
HTTP Request Builder
LOCAL · Browser-OnlyBuild and test HTTP requests with custom headers and body
Authentication
Headers
Generate Code
curl -X GET 'https://api.example.com/endpoint' \
-H 'Content-Type: application/json'Showing a sample URL. Enter your endpoint above to update the snippet.
Related HTTP status codes
All http status codes →301 Moved Permanently
The resource has a new permanent URL, given in Location. Search engines transfer ranking signals to the target and clients may cache the redirect.
303 See Other
The result of the request is at another URL, and the client should fetch it with GET regardless of the original method.
307 Temporary Redirect
Same as 302 but with a guarantee: the client must repeat the request with the original method and body, so a POST stays a POST.
304 Not Modified
The cached copy the client already holds is still current, so the server sent no body. This is what makes conditional requests cheap.
305 Use Proxy
Deprecated. It once told the client to repeat the request through the proxy named in Location, which turned out to be a security problem.
308 Permanent Redirect
A permanent redirect that preserves the request method and body. This is 301 without the historical POST to GET rewrite.
Tools for this
- HTTP Request Builder Free online HTTP request builder - build and test HTTP requests with custom headers and body
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL