HTTP 307 Temporary Redirect is similar to 302 Found but explicitly requires that the request method and body must not change when following the redirect. If a POST was sent, the redirect must also be a POST. This is used when method preservation is important.
307 Temporary RedirectGET /page HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0
Accept: text/htmlHTTP/1.1 307 Temporary Redirect
Location: https://example.com/page
Content-Type: text/html; charset=utf-8
Content-Length: 154
Strict-Transport-Security: max-age=31536000
<!doctype html>
<html>
<body>
<h1>Temporary Redirect</h1>
<p>This resource is temporarily at <a href="https://example.com/page">https://example.com/page</a>.</p>
</body>
</html>If the redirect is permanent, use 308 instead of 307.
Confirm the client follows the redirect using the same HTTP method.
curl -v -X POST -d 'data=value' -L https://example.com/api
If you see 307 redirects from HTTP to HTTPS, verify your HSTS headers are configured correctly.
When HSTS is active, browsers internally redirect HTTP requests to HTTPS using 307, preserving the original request method.
A load balancer temporarily sends traffic to a different backend while preserving the request method and body.
| Specification | Section |
|---|---|
| HTTP Semantics | RFC 9110 §15.4.8 |
This reference was compiled from official RFCs, protocol specifications, and hands-on troubleshooting experience. AI tools were used primarily for formatting and organizing the content on the page.