301 vs. 307 Redirects

In web development ‑ and in the simplest form ‑ we use redirects to send visitors from the place they have requested, to another (or another place, on another website). The most common types of redirect are 301 and 307.
301 Redirect
A 301 redirect ‑ a "permanent redirect" ‑ is used when a page has been permanently moved to a new location. This type of redirect informs visitors (and notably: search engines) that the old page is no longer valid and that they should index the new page instead. It also passes on some of the old page's ranking power to the new page, which helps to maintain or improve its search engine ranking.
307 Redirect
A 307 redirect ‑ a "temporary redirect" ‑ is similar to a 302, but it tells visitors that the change is only temporary and that the request method should not be changed when the redirection is followed. The most common use for a 307 would be during maintenance or a short‑term change such as a competition or temporary rebrand.
The Difference
Essentially when a search engine crawler comes across a 301, it should ‑ in theory ‑ replace the URL it visited, with the new one. When it arrives at a 307, it will remember the original URL rather than the one it has been redirected to.
Where 302 and 308 Fit
Redirects are easier to reason about when you separate permanence from request handling. A 301 tells clients and search engines that the move is permanent. A 302 is the familiar temporary alternative. A 307 is also temporary, but it is stricter about preserving the original request method. A 308 is the permanent version of that stricter behaviour.
That method‑preserving detail matters when the request is not a simple GET. If a form submits with POST, a 307 or 308 tells the client to repeat the request with the same method. Older 301 and 302 handling has often been looser in practice, with clients sometimes changing the follow‑up request to GET.
Cache and Search Behaviour
The search impact follows the permanence signal. A permanent redirect is a strong instruction that the destination should replace the original URL over time. A temporary redirect says the original URL is still the canonical location for now, even if users are being sent somewhere else.
Caching follows the same broad shape. Permanent redirects can be cached aggressively by browsers, CDNs and search crawlers. Temporary redirects are safer when you are testing a move, running a short campaign or routing users around a temporary problem.
A Practical Rule of Thumb
Use 301 when the old URL is finished and the destination is the long‑term replacement. Use 307 when the move is temporary and preserving the request method matters. If you need a permanent method‑preserving redirect, reach for 308, but check the clients and infrastructure you support before rolling it out everywhere.