HTTP 307 — Temporary Redirect
3xx Redirection
What it means
Like 302, but guarantees the method and body are preserved. A POST stays a POST.
What to do about it
Prefer 307 over 302 for anything that is not a plain GET.
Where it sits
307 belongs to the 3xx family: Further action is needed to complete the request — usually following a redirect.
HTTP/1.1 307 Temporary Redirect
Checking it yourself
# see the status code and headers only
curl -sI https://example.com/path
# follow redirects and print each hop
curl -sIL -o /dev/null -w "%{http_code} %{url_effective}\n" https://example.com/path
# JavaScript
const r = await fetch(url);
console.log(r.status, r.statusText);
How this code behaves
| Cacheable by default | No — caches must not store this response unless explicit cache headers permit it. |
| Safe to retry | Not applicable. |
| Effect on search indexing | No direct effect. |
Returning 307 correctly
# nginx
return 307;
# Express
res.status(307).json({ error: 'Temporary Redirect' });
# Go
w.WriteHeader(307)
# Python (Flask)
return jsonify(error='Temporary Redirect'), 307;
Frequently asked questions
What does HTTP 307 mean?
Like 302, but guarantees the method and body are preserved. A POST stays a POST.
How do I fix a 307 error?
Prefer 307 over 302 for anything that is not a plain GET.
Is 307 a client or server problem?
Neither — it is an instruction to look somewhere else, and clients normally follow it automatically.