Reference guide · http-status · Published 2026-08-15 · 4 min read

HTTP 302 and temporary redirects

HTTP 302 temporary redirect explained: when 302 is correct, when to choose 301 instead, and how to keep a temporary swap from becoming a SEO data leak.

Flat editorial illustration showing a lantern-style status readout with a neat row of stacked directory rails, each rail marked with an abstract tally.
Illustration: this article at a glance.

What a 302 is

A 302 Found (historically "Moved Temporarily") says the requested URL is reachable for now at another location, but the URL itself remains the real address. The browser follows the Location header for the request, yet old browser entries, bookmarks, and the local cache are not instructed to swap permanently. The practical result is that the origin URL keeps the value.

The modern, unambiguous temporary code is 307: the two are close semantically, but 307 forbids changing the request method on redirect while 302 historically allowed it. For everyday page redirects either browser response is fine; for APIs with strict method semantics 307 is the safer match.

302 versus 301 in one view

Aspect301 permanent302 temporary
MeaningURL moved foreverURL borrowed for a while
Search valueCarries links and signals to the targetOld URL keeps value, crawlers may still index it
302 to a permanently dead pageLeaks value and confusionWrong choice, dead end
ExampleMoved a blog slug, new product URLA/B test, banner, promo takeover

How search engines treat 302 or other temporary

Search engine behavior follows the same rules as browsers, but with a permanent bias. When a crawler lands on a 302, the common heuristic is: render the target as the result for that request while still treating the source URL as the live address. Two practical consequences follow:

  1. If the temporary redirect is never removed, the crawler keeps collecting both URLs, link equity does not consolidate, and the temporary landing page can outrank the page you meant to keep.
  2. If you announce a permanent move as 302, or a temporary swap as 301, the classifier usually trusts the status code, so the wrong outcome can stick far longer than the test window you planned.

When to use a 302

When to use a 301

The fix order (temporary redirects that last)

  1. Schedule a review date in your task list when you add the 302; temporary redirects that outlive their plan get treated like a permanent that was never labeled.
  2. If the swap is likely to be permanent, skip the 302 and set up the 301 from the start. Changing from 302 to 301 later costs a second redirect on the same URL.
  3. For an A/B test, never mix status: the same URL should not be a 302 in one environment and a 301 in another.
  4. Use curl against the URL after traffic to confirm the plan still says 302 and the Location header points to the intended target.

Verify the response

curl -I https://example.com/sale/
HTTP/2 302
location: https://example.com/offers/

Prevention

When to use a 301 instead

The boundary is simple: permanent content and SEO equity wants 301; experiments, events, and short-lived swaps want 302 or 307.

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