Repeat the same request at another URL.
When to use it
Temporary redirect that must keep the method and body.
Good to know
307 guarantees the client repeats the same method and body at the new URL, so a POST stays a POST. That makes it right for temporarily moving API endpoints. You also see an “internal” 307 in Chrome DevTools when HSTS is active: the browser upgrades http:// to https:// on its own, without contacting the server, and labels it Non-Authoritative Reason: HSTS.
Search engines treat 307 as temporary, like 302, and browsers don’t cache it without explicit headers. Bodies must be replayable: fetch with a streaming ReadableStream body can’t follow a 307 and fails. Browsers and curl drop the Authorization header when a redirect crosses to another host; curl only keeps it with --location-trusted. Use curl -L to follow it, and the method is preserved automatically.
Redirection (3xx)
3xx codes are redirections: the client has to go somewhere else, or use its cached copy, to finish the request.
What it looks like
HTTP/1.1 307 Temporary RedirectHow to send it
| Node.js / Express | res.redirect(307, '/new-url') |
|---|---|
| Python / Flask | return redirect('/new-url', code=307) |
| nginx | return 307 https://example.com$request_uri; |
How to check it
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/