Skip to content

3xx Redirection

307 Temporary Redirect

Temporarily at another URL; repeat the same request (same method and body) there.

What 307 means

Like 302, but the client must not change POST into GET. The right temporary redirect for APIs.

Common causes

  • Temporary moves, http → https upgrades by some servers (HSTS internal redirects in browsers show as 307).

How to fix it

If you're calling an API

  • Follow Location with the same method and body (curl -L does this).

If you run the server

  • Prefer 307 over 302 for API endpoints.

Should you retry?

Repeat the request at Location.

Example response

HTTP
HTTP/1.1 307 Temporary Redirect
Location: https://api.example.com/v1/items

Related headers: Location.

Defined in: RFC 9110 (HTTP Semantics). 307 is a redirection.

Often confused with

HTTP 307 FAQ

What does HTTP 307 mean?

307 Temporary Redirect: Temporarily at another URL; repeat the same request (same method and body) there. Like 302, but the client must not change POST into GET. The right temporary redirect for APIs.

Is 307 a client or server error?

Neither: 307 is a redirection response (3xx). Further action (usually following a new URL) is needed.

How do I fix a 307 error?

Follow Location with the same method and body (curl -L does this).

Should I retry after a 307?

Repeat the request at Location.

Other 3xx status codes

All HTTP status codes