307 Redirect
A 307 Redirect is an HTTP status code (307 Temporary Redirect) that tells browsers and search engines a URL has temporarily moved to a different address. It is similar to a 302 redirect, but with one critical distinction: the original HTTP method (GET, POST, etc.) and request body must be preserved exactly when following the redirect.
A 307 Redirect is an HTTP status code (307 Temporary Redirect) that tells browsers and search engines a URL has temporarily moved to a different address. It is similar to a 302 redirect, but with one critical distinction: the original HTTP method (GET, POST, etc.) and request body must be preserved exactly when following the redirect.
Why It Matters
Because a 307 redirect clearly signals a temporary move while preserving the request method, it prevents data loss in scenarios involving POST form submissions or API calls. When search engines receive a 307 response, they keep the original URL in their index and do not transfer link equity to the new URL. This means the original URL's SEO value remains fully intact once the temporary redirect is removed. However, maintaining a 307 redirect for an extended period forces search engines to repeatedly visit the original URL, wasting crawl budget. If a temporary situation has become permanent, switching to a 301 or 308 redirect is recommended.
Difference from 302
| Attribute | 307 (Temporary Redirect) | 302 (Found) |
|---|---|---|
| HTTP method preservation | Strictly preserved (POST stays POST) | Method may change (POST can become GET) |
| Standard definition | Clearly defined in HTTP/1.1 | Exists since HTTP/1.0 but method handling is ambiguous |
| Search index | Original URL retained | Original URL retained |
| Link equity transfer | Not transferred | Not transferred |
| Primary use case | Temporary moves requiring POST preservation | General temporary moves |
The 302 status code has a historical ambiguity: under older standards, some browsers converted POST requests to GET when following a 302. The 307 code was introduced in the HTTP/1.1 specification to eliminate this ambiguity. When POST data must not be lost, 307 is the safer choice over 302.
Use Cases
- Server maintenance: When traffic needs to be temporarily routed to another server or a maintenance page, a 307 redirect ensures a smooth return to the original URL once maintenance is complete.
- A/B testing: Temporarily sending a subset of users to a different page version while preserving the original URL's search rankings.
- HSTS (HTTP Strict Transport Security): Browsers use a 307 status code internally when redirecting HTTP requests to HTTPS. This is a browser-level behavior and does not require separate server configuration.
- Temporary POST endpoint migration: When form submissions or payment processing requests that must retain the POST method need to be temporarily forwarded to a different endpoint, a 307 redirect is essential.
Related inblog Posts
How inblog Helps
inblog's dashboard uses 307 status codes for temporary redirects.