Qaynaq LABS · TOOLS

HTTP · 3xx Redirection

307 Temporary Redirect

The requested resource is temporarily located at a different URI, and future requests should still use the original URI.

When you see this status

  • Server is temporarily moving a resource to a new URI
  • Load balancer redirects client to another backend server
  • API versioning requires temporary redirection to a new endpoint
  • Maintenance page is served from a different URL

Common causes

  • Server-side configuration change
  • Load balancing or failover
  • Temporary resource relocation
  • Security policy enforcement

How to debug it

  1. Verify the Location header contains the correct temporary URI
  2. Check server logs for redirection rules
  3. Ensure client follows redirects automatically
  4. Test with curl -v to inspect headers

Return this code in your framework

Express (Node.js)
res.redirect(307, 'https://example.com/new-path');
FastAPI (Python)
return RedirectResponse(url='/new-path', status_code=307)
NestJS
@Get() @Redirect('/new-path', 307) getRedirect() {}
Go (net/http)
http.Redirect(w, r, "/new-path", 307)

About HTTP 307

HTTP status code 307 Temporary Redirect is part of the 3xx Redirection family. The requested resource is temporarily located at a different URI, and future requests should still use the original URI. Understanding it is essential for backend engineers, API designers, and anyone debugging integrations between services.

The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance: what triggers them, how to debug them in production, and exactly how to return them from common frameworks. Each code page is hand-curated and verified.

Frequently asked

Does 307 preserve the HTTP method?

Yes, unlike 302 or 303, 307 requires the client to repeat the original request method.

Can browsers cache 307 responses?

No, 307 responses are not cached by default. Clients must follow the redirect each time.

When should I use 307 vs 308?

Use 307 for temporary redirects where the original method must be preserved. Use 308 for permanent redirects.