HTTP Status Code 307 Explained
HTTP status code 307 means that the requested resource is temporarily available at another location. A browser, application, or API client should repeat the request at the destination while keeping the original HTTP method and request body unchanged.
What Is HTTP Status Code 307?
Status code 307 is an HTTP response called Temporary Redirect. A server sends this response when it wants the client to use a different location for the current request without treating the change as permanent.
The 307 status code meaning is mainly about safe request handling. If the original request used GET, the redirected request must use GET. If it used POST with submitted data, the client must repeat POST with the same request body unless the user or application stops the redirect.
For anyone asking what is status code 307 or what does status code 307 mean, the key point is that the requested resource may still return to its original address later. Search engines, browsers, and applications should not assume that the destination permanently replaces the original URL.
How Does a 307 Redirect Work?
An HTTP 307 redirect status code normally includes a Location response header. The Location header identifies the destination where the client should repeat the request.
- The client sends a request to the original address.
- The server replies with the 307 temporary redirect status and a Location header.
- The client reads the destination from the Location header.
- The client sends the request to that destination using the same HTTP method and request body.
- The destination server returns its own response, which may be content, an error, or another redirect.
Method preservation matters most for requests that change or submit data. A correctly handled 307 redirect does not silently turn a POST, PUT, PATCH, or DELETE request into GET. API clients should also preserve relevant body data, but authentication and other sensitive headers may require separate handling when the destination uses a different host.
How Is 307 Different From 302, 303, and 308?
The practical difference among redirect codes is whether the move is temporary or permanent and whether the redirected request must keep its method.
- 307 Temporary Redirect: The redirect is temporary, and the client must preserve the original method and request body.
- 302 Found: The redirect is temporary, but older browser behavior may change a POST request to GET. That historical behavior makes 302 less explicit when method preservation matters.
- 303 See Other: The client should retrieve the destination with GET, commonly after a submitted request. The original method is not preserved for the follow-up request.
- 308 Permanent Redirect: The client must preserve the method and body, but the redirect is permanent rather than temporary.
A 307 HTTP status is therefore useful when a temporary destination must receive the request exactly as the original destination would have received it. It should not be confused with a permanent redirect.
Why May You See a 307 Status?
A 307 HTTP status code can appear because the server, application, browser, or an intermediary has decided that the request belongs at a temporary destination.
- A page or API route has moved temporarily during maintenance or a staged change.
- A server redirects an unencrypted HTTP request to an encrypted HTTPS destination.
- A reverse proxy, load balancer, content delivery layer, or security rule applies a redirect.
- Application routing sends a request to another path, host, language, or regional endpoint.
- Authentication or session logic sends the request through an intermediate route.
- A browser remembers an earlier redirect or applies an internal security policy that upgrades the request.
- Conflicting rules create a redirect loop in which two or more locations repeatedly redirect to one another.
Seeing the status code 307 is not automatically an error. It becomes a problem when the destination is wrong, the redirect repeats indefinitely, submitted data reaches an unintended route, or the client cannot follow the response.
How Can You Diagnose a 307 Response?
Diagnosing an HTTP status code 307 requires checking the response itself and each request that follows it. Do not rely only on the final page shown by a browser, because browsers often follow redirects automatically.
- Open the browser developer tools or enable response details in the API client.
- Select the original request and confirm that its response status is 307.
- Inspect the Location response header and record the exact destination.
- Compare the original and redirected requests. Confirm that the HTTP method and request body remain unchanged.
- Review the full request chain. Repeated destinations or a return to an earlier address indicate a likely redirect loop.
- Test in a private browser window to reduce the effect of stored cookies and cached behavior.
- Test with automatic redirect following disabled in an API tool so the first response and its headers remain visible.
- Compare results across the browser, API client, and server logs when authorized access to those logs is available.
If the browser shows a redirect that does not appear in a direct API test, browser cache, an extension, a service worker, or a browser security rule may be involved. If every client receives it, inspect server, proxy, and application routing in the order the request passes through them.
How Do You Fix an Unexpected 307 Redirect?
How to fix status code 307 depends on whether you are visiting a site, developing a client, or controlling the server. First verify the destination and redirect source; changing production settings without that evidence can interrupt valid traffic or expose submitted data.
Website visitors can try these steps:
- Reload the page once and check that the address is the one you intended to visit.
- Open a private browser window to test without the usual session state.
- Clear stored data for the affected site if the redirect occurs only in the regular browser window.
- Disable browser extensions temporarily if the redirect occurs only in one browser.
- Stop if the destination looks unfamiliar or the browser repeats the redirect, then report the exact time and original address to the site operator.
Developers can try these steps:
- Capture the first response without automatically following redirects.
- Validate the Location value and determine whether the client resolves relative destinations correctly.
- Confirm that the redirected request preserves its method, body, and required content headers.
- Review whether credentials or authorization headers are intentionally retained or removed when the host changes.
- Add a redirect limit and log each hop so loops fail clearly.
Site administrators can try these steps:
- Trace the redirect through application routes, web-server rules, proxies, load balancers, and security layers.
- Check for overlapping HTTP-to-HTTPS, host, path, or trailing-slash rules.
- Compare the configured destination with the route that should handle the preserved method and body.
- Reproduce the behavior in a non-production environment and test GET and body-carrying methods separately.
- Back up the current configuration, review the change with the responsible team, and use the normal deployment and rollback process.