Reference guide · http-status · Published 2026-08-16 · 3 min read

HTTP 307 temporary redirect

HTTP 307 temporary redirect explained: it preserves the method and body, where it beats 302, and how to configure and test it.

What 307 means

307 Temporary Redirect is a 30x family response that moves the client to a Location header, for a short time, while keeping the HTTP method and body intact. It is the temporary cousin of 308: the same "keep the method" guarantee, but where 308 promises permanence, 307 is explicitly temporary, and the client should keep asking the original URL later.

The browser, API client and search engine behave the same on a 307 as they do on a 302, except for one decisive difference: the method does not change. Where an old-style 302 (and 301) may turn a POST into a GET, a 307 re-sends the same verb and body to the new location.

The decisive difference: the method

CodeMeaningPOST after redirectCacheable
302Found (temporary)Often becomes GETUsually no
307Temporary redirectKeeps POSTUsually no
308Permanent redirectKeeps POSTYes

Browsers historically rewrite 302 semantics in ways that surprise: a login form, a payment submit or a multipart upload that gets a 302 can end up as a GET to the new URL with the body discarded. A 307 removes that ambiguity for the temporary case, and it is the method-preserving choice that keeps the same verb and body intact.

When to reach for 307

Comparing with 308

A common slip is to use 307 as if it were permanent or to set a max-age on a 307 that makes a client cache a temporary redirect past its actual life. The temporary family should not be cached aggressively, because a mistimed Cache-Control can freeze a temporary redirect; the redirect methods guide and the redirect map migration article cover when each status belongs.

Configuration examples

# nginx: redirect a moved endpoint for a temporary campaign
location /flash-sale/ {
    return 307 https://www.example.com/deals/campaign;
}
# Apache
Redirect 307 /flash-sale/ https://www.example.com/deals/campaign

Verify with curl that the method survived:

curl -i -X POST -d "name=jane" http://example.com/api/order
# HTTP/1.1 307 Temporary Redirect
# location: https://www.example.com/api/order

If the target shows in the request as GET, some layer turned the 307 into a 302. The more complete status list is in the status reference.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services