Skip to content
3xx Redirection

307 Temporary Redirect

Same as 302, but the method and body must not be changed when following the redirect.

What causes it

  • An API redirecting a POST to a different host without losing the body.
  • HSTS-preloaded upgrades from HTTP to HTTPS.

How to fix it

  • Use 307 rather than 302 whenever the request is not a GET and the body matters.

At a glance

Class
3xx Redirection
Reference
RFC 9110 §15.4.8
Standardised
Yes
Retry the request?
No — fix the request

Other 3xx redirection codes

Back to the full HTTP status code reference