HTTP 307 Temporary Redirect

The resource is temporarily at another URL; repeat the same request — same method, same body — there, and keep using the original URL afterwards.

Defined in RFC 9110 §15.4.8 — 307 Temporary Redirect · MDN reference

Where you meet HTTP 307 in production

Temporary moves where the method matters: an API failing over to another region, a load balancer bouncing an upload, HSTS upgrades in browsers (shown as an internal 307).

Why you would test it

Test a redirected POST: the body has to arrive at the new location intact. Clients that rebuild the request from scratch often drop it.

What your client should do about a 307

Re-send the identical request to Location. Do not update bookmarks or stored URLs — it is temporary. Be wary of following a 307 that carries credentials to a different host.

307 versus the codes it gets confused with

Endpoints that return 307

1 endpoint in this playground answers with 307. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 307

Why do I see a 307 in Chrome when I typed http://?
That is HSTS: the browser upgrades to https internally and reports it as a 307 "Internal Redirect". No request reached the server.
Does fetch() follow a 307 POST?
Yes, with the same method and body, as long as the body can be replayed (a stream cannot).

Other redirection codes

All HTTP status codes · All 39 mock REST APIs · Getting started guide

Last updated