Skip to main content
HTTP/3xx (Redirection)

307 Temporary Redirect

The request should be repeated with another URI; however, future requests should still use the original URI without changing the HTTP method.

❓ Why does this happen?

Ensures POST requests redirected to a new endpoint retain the POST method and original payload.

✅ How to fix it

Follow the Location header while maintaining original request method and payload.

Return or handle 307 in your stack

// app/old-path/route.ts
export function GET(request: Request) {
  return Response.redirect(new URL("/new-path", request.url), 307);
}

Live 307 mock endpoint

Point your app, tests, or retry logic at this free public URL to reproduce a real 307 response (CORS enabled, optional ?delay=ms up to 5000).

https://castov.com/api/mock/307

307 vs similar status codes

Frequently Asked Questions

What does HTTP Status 307 mean?
The request should be repeated with another URI; however, future requests should still use the original URI without changing the HTTP method.
Why am I getting a 307 status code?
Ensures POST requests redirected to a new endpoint retain the POST method and original payload.
How do I fix a 307 Temporary Redirect error?
Follow the Location header while maintaining original request method and payload.
What is the difference between 307 Temporary Redirect and 302 Found?
Both are temporary. 302 allows clients to switch POST to GET; 307 guarantees the same method and payload are re-sent.
How can I test how my app handles a 307 response?
Send a request to https://castov.com/api/mock/307 — it returns a real 307 Temporary Redirect response with CORS enabled. Add ?delay=2000 to simulate a slow server.

Other 3xx status codes

Browse the full HTTP status codes directory or troubleshoot terminal errors in the Error Fix Encyclopedia.