307 Temporary Redirect
3xx redirection
A temporary redirect where the client must repeat the exact same request — method and body — at the new URL.
307 is a 302 without the ambiguity: the client must resend the same method and body to the Location URL, so a POST stays a POST. That makes it the safe temporary redirect for APIs and form endpoints.
Browsers also show an internal 307 when HSTS upgrades an http:// URL to https:// before the request ever leaves the machine.
| Class | 3xx Redirection |
|---|---|
| Retry? | Not applicable |
| Cacheable by default | No — only with explicit Cache-Control |
| Response body | Allowed |
| Defined in | RFC 9110 §15.4.8 — 307 Temporary Redirect |
HTTP/1.1 307 Temporary Redirect Location: https://api.example.com/v2/orders
When you'll see it
- Temporary moves of API endpoints.
- HSTS upgrades, which Chrome DevTools labels '307 Internal Redirect'.
- Next.js
redirect()and non-permanentredirectsin next.config respond with 307.
How to use it well
- Use 307 instead of 302 whenever the method must be preserved.
- For a permanent move with the same guarantee, use 308.
- A '307 Internal Redirect' in DevTools is HSTS, not your server — there's nothing to fix.
Useful here: 301 vs 302 vs 307 vs 308
Send a 307 from your server
res.redirect(307, "https://api.example.com/v2/orders");
return NextResponse.redirect(new URL("https://api.example.com/v2/orders", request.url), 307);return redirect("https://api.example.com/v2/orders", code=307)http.Redirect(w, r, "https://api.example.com/v2/orders", http.StatusTemporaryRedirect)
return 307 https://api.example.com/v2/orders;
Check what a URL returns
Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.
curl -sI https://example.com/your-path | head -n 1
Frequently asked questions
What does '307 Internal Redirect' mean in Chrome?
The site sent a Strict-Transport-Security header earlier, or is on the HSTS preload list, so Chrome rewrote http:// to https:// locally. No request reached the server.
307 vs 302?
Same meaning — temporary — but 307 forbids changing the method. With a 302, browsers turn a POST into a GET.