Skip to main content
短.be

307 Redirect

A temporary HTTP redirect that preserves the original request method, ensuring POST requests are not converted to GET.

Jul 15, 2025 · About 1 min read

Redirect

A 307 redirect is an HTTP/1.1 status code for temporary redirects that strictly preserves the original request method. If a POST request receives a 307 response, the browser must resend the POST request to the new URL, unlike a 302 which may convert the request to GET. This method preservation makes 307 essential for API endpoints and form submissions.

The 307 status code was introduced to resolve ambiguity in the 302 specification. While 302 was defined as a temporary redirect, many browsers changed POST requests to GET when following a 302 redirect. The 307 code explicitly requires that the request method remain unchanged, providing predictable behavior for developers. HTTP specification books on Amazon cover these distinctions.

In URL shortening, 307 redirects are less common than 301 or 302 because most short URL clicks are GET requests. However, 307 becomes relevant when short URLs are used in API contexts or when the shortening service needs to redirect POST requests without altering the method.

The practical difference between 302 and 307 is primarily relevant for non-GET requests. For standard browser navigation via link clicks, both behave identically. The choice matters when building APIs or handling form submissions through redirect chains. API design books on Amazon discuss these patterns.

Share on XHatena

Was this article helpful?

Related Terms

Related Articles

FAQ

When should 307 redirects be used?
When temporarily redirecting POST requests to another URL. Unlike 302, 307 guarantees that the request method won't be changed.
What's the difference between 307 and 302?
Both are temporary redirects, but 307 preserves the request method (POST, PUT, etc.). With 302, the method may change, and POST requests might be converted to GET in some implementations.

Ready to create a short URL?

Shorten a URL for Free