HTTP 307 Temporary Redirect

The resource temporarily resides under a different URL and the request method must not change.

3xx Redirection

307

Temporary Redirect

Description

The 307 Temporary Redirect status code indicates that the target resource resides temporarily under a different URI and the user agent must not change the request method if it performs an automatic redirection to that URI. Since the redirection can change over time, the client ought to continue using the original target URI for future requests. The key difference between 307 and 302 is that 307 guarantees that the method and the body will not be changed when the redirected request is made. With 302, some clients erroneously change the method to GET. If preserving the request method is important (such as maintaining a POST request through a redirect), 307 should be used instead of 302.

When Is It Used?

Used when you need a temporary redirect that preserves the original HTTP method. Important for API redirects where a POST request must remain a POST after the redirect, unlike 302 which may change the method to GET.

Example Response

HTTP/1.1 307 Temporary Redirect
Location: https://api.example.com/v2/resource

Look Up Any Status Code

Browse all status codes