307Status code
3xxRedirection
NoCacheable by default
RFC 9110 §15.4.8Defined in
Common causes
- Temporary move of an API endpoint that receives POST
- Browser-internal redirect for HSTS upgrades
What to do
Choose 307 over 302 whenever the method must not change.
Example response
HTTP/1.1 307 Temporary Redirect Location: https://example.com/new-path Content-Length: 0
How to send a 307
nginx return 307 https://example.com/new-path;
Apache Redirect 307 /old https://example.com/new-path
Express res.redirect(307, '/new-path');
PHP header('Location: /new-path', true, 307);