307 Temporary Redirect

All status codes
3xx · Redirectionretryable

307Temporary Redirect

Similar to 302, but explicitly requires the client to retain the same HTTP method (e.g. POST remains POST) during the redirection.

What this code obliges you to do

Retry

Safe to retry

Repeating the same request can succeed, so a client may back off and try again. Honour Retry-After when the response sends one.

Caching

Not cacheable by default

Caches will not store this response unless you send explicit freshness headers saying they may.

Response body

Body allowed

You may return a payload explaining the outcome — for an error, a machine-readable problem document is worth the effort.

Method

Method and body preserved

The client must repeat the original method and body against the new URL. This is the code to use when redirecting a POST.

Indexing

Original URL is kept

A temporary redirect leaves the original URL in the index. Use it for A/B tests, maintenance, and geo or device routing.

When you see it

2
1

Form submission redirects

2

HSTS upgrades (internal browser tracking)

Effect on search

Functions similarly to a 302. Use this strictly for temporary API or form redirects.

How to send it

1
Python (Flask)
return redirect(url_for('login'), code=307)

Codes people confuse with this one

3
Class3xx
RetrySafe
CacheNo
BodyAllowed