Skip to main content
miji.be

307 Redirect

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

Sep 12, 2026 / 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 is what makes 307 useful 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, browser implementations that changed POST requests to GET when following a 302 redirect became widespread. The 307 code explicitly requires that the request method remain unchanged, providing predictable behavior for developers.

In URL shortening, a short URL click from a browser is a GET request, so the difference between 307 and 302 does not surface there. 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.

Was this article helpful?

Related Terms

301 Redirect

A permanent HTTP redirect that tells browsers and search engines the resource has moved permanently to a new URL.

302 Redirect

A temporary HTTP redirect indicating the resource is temporarily located at a different URL.

308 Redirect

A permanent HTTP redirect that preserves the original request method, combining the permanence of 301 with the method preservation of 307.

404 Not Found

An HTTP status code indicating that the server cannot find the requested resource at the specified URL.

Response Code Negotiation

A design technique that dynamically selects the HTTP status code returned during redirects based on client type and request conditions.

HTTP Status Code

A three-digit number returned by a web server indicating the result of a client's request.

Related Articles

301 vs 302 Redirects - Choosing the Right Type for Short URLs

Understand the differences between 301 and 302 HTTP redirects. Learn how each type affects SEO, analytics, and performance for short URLs.

How URL Shorteners Work - The Technical Side of Redirects

Discover the technical mechanics behind URL shortening: hash generation, database lookups, HTTP redirects, and more. Includes HTTP response examples and base-62 encoding calculations.

URL Shortener API Guide - Generating Short URLs Programmatically

A practical guide to using URL shortener APIs. Learn about request formats, response structures, authentication, and implementation patterns.

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.

Put the terms to work

Shorten a URL for Free