3xx

307 Temporary Redirect

The resource is temporarily at a different URL and the request method must not change.

What is HTTP 307?

This status code indicates that the resource temporarily resides at a different URI, and the client must repeat the request using the same HTTP method and body. Unlike 302, which historically allowed browsers to change POST to GET, 307 strictly preserves the request method. This makes it the correct choice for temporarily redirecting POST, PUT, or DELETE requests to a different endpoint while maintaining the original method.

Defined in RFC 9110

Common Causes

  • Temporary maintenance redirects where the original request method must be preserved
  • Load balancing that temporarily routes requests to a different server
  • API versioning where a temporary redirect points to the current endpoint without changing the method

How to Fix

  • Repeat the request with the same method and body to the URL in the Location header
  • Continue using the original URL for future requests since the redirect is temporary
  • If the redirect should be permanent with method preservation, use 308 instead