HTTP 307

307 Temporary Redirect

Redirect

The target resource resides temporarily at a different URI and the client must not change the request method when following the redirect. 307 was added in HTTP/1.1 specifically to remove the ambiguity of 302. Where most clients silently downgrade POST to GET, 307 requires the client to preserve the original method, headers, and body. This makes 307 the correct temporary redirect for APIs and any non-GET request.

When does this happen?

Use 307 when you need a temporary redirect that preserves the HTTP method. The clearest signal that 307 is the right choice is when the original request had a body. A POST, PUT, PATCH, or DELETE. With 307 the client will reissue the same method against the new URL with the original body intact. The classic HSTS scenario is the Chrome internal upgrade: when a Chromium-based browser has cached an HSTS policy for a domain, it rewrites http:// to https:// before sending and surfaces the rewrite as a synthetic '307 Internal Redirect' row in DevTools (with a Non-Authoritative-Reason: HSTS header). Firefox and Safari perform the same upgrade silently and do not emit a redirect entry in their network panels. Other uses include load balancers temporarily routing traffic to a different backend, API gateways relocating endpoints during deploys, and edge functions that need to bounce a request to a different region while keeping the body. Like 302, 307 is not cached aggressively by browsers and search engines do not transfer ranking signals through it.

Common causes

How to fix it

Real-world examples

Browser navigates to http://example.com and the domain has an HSTS policy from a previous HTTPS visit.
Browser internally rewrites the URL to https://example.com without touching the network. Chrome shows a synthetic '307 Internal Redirect' row in DevTools; Firefox and Safari upgrade silently with no extra entry.
API client issues POST /v1/uploads with a 10MB body and the gateway is routing /v1/uploads to a temporary upstream.
Gateway returns 307 with Location: /tmp-uploads. Client reissues POST /tmp-uploads with the same body. The upload completes normally.
Edge function routes a POST to a different region while the home region is failing over.
Edge returns 307 with Location pointing at the failover region. Client preserves method and body and the request completes in the new region.
Load balancer drains pool A and redirects in-flight traffic to pool B.
LB returns 307 to clients with Location at pool B's endpoint. Clients reissue with the original method and the operation completes without data loss.

Debugging

How it differs from related codes

HTTP 302

302 is the legacy temporary redirect that most clients downgrade to GET. 307 is the strict-method version. Required for any request with a body you care about preserving.

HTTP 308

308 is permanent, 307 is temporary. Both preserve the method. Use 308 when search engines and clients should treat the new URL as canonical; use 307 when the move may be reversed.

HTTP 301

301 is permanent and historically allowed method downgrade. 307 is temporary and forbids method downgrade. The pairings are 301↔308 (permanent) and 302↔307 (temporary).

Related status codes

301 302 303 308 400 405

See HTTP 307 in your redirect chains?

Check your URLs with checkredirects.io