HTTP 307 Temporary Redirect — What It Means and How to Fix It

The HTTP 307 (Temporary Redirect) status code indicates that the requested resource has been temporarily moved to a different URI. The client should continue to use the original URI for future requests, and the redirect method (GET, POST, etc.) should not be changed when following the redirect.

Last updated: 2026-06-11

RECOMMENDED

Essential Reading: Designing Data-Intensive Applications

The system design bible for software engineers. Learn to build reliable, scalable, and maintainable systems.

View on Amazon →
Status Code 307
Name Temporary Redirect

Common Causes

  • Temporary maintenance or server reconfigurations where the resource will eventually return to its original location.
  • Load balancing or content delivery network (CDN) routing where requests are temporarily directed to an alternate server.
  • A temporary change in the URL structure for a specific resource, with the intention of reverting later.

Code Examples to Handle HTTP 307

curl -I https://httpbin.org/status/307

How to Fix It

  1. **Verify the redirect target:** Check the `Location` header in the response to see where the request is being redirected. Ensure this target is valid and accessible.
  2. **Inspect server configuration:** On the server side, examine web server (e.g., Apache, Nginx) or application-level configurations for redirect rules that might be issuing 307s.
  3. **Review application logic:** If the redirect is generated by application code, debug the code to understand why a 307 is being issued and if it's the intended behavior.
💡 Example: A user tries to access `https://example.com/old-product-page`. The server is undergoing a temporary update to its product catalog, so it responds with a 307 redirect to `https://example.com/temp-product-listing` with a `Location` header. The user's browser then automatically navigates to the temporary page, preserving the original request method if it was a POST.
🛠️ Developer Tip: When implementing temporary redirects, use 307 if you want to explicitly preserve the HTTP method of the original request. Avoid using 302 if the method preservation is critical, as some older clients might incorrectly change POST to GET.

Related Status Codes

Frequently Asked Questions

What causes HTTP 307?

HTTP 307 is typically caused by server-side configurations or application logic that temporarily moves a resource to a new location, while explicitly instructing the client to preserve the original HTTP method for the redirect.

How do I fix HTTP 307?

To fix or understand a 307, examine the `Location` header to see the redirect target. On the server, check web server configurations (e.g., `.htaccess`, Nginx configs) or application code for redirect rules. Ensure the temporary redirect is intentional and points to a valid resource.