302 Found: using temporary redirects correctly

302 Found is a temporary redirect: the client goes to another URL for now, and Google usually keeps the original URL in search results.

Check a URL’s status code

302 Found is a temporary redirect. The server sends the client to another URL, given in the Location header, for now, but the original address remains the one to use in future. HTTP/1.0 called it “Moved Temporarily”; HTTP/1.1 renamed it “Found.”

Definition

RFC 9110, section 15.4.3 says the target resource “resides temporarily under a different URI,” and because the redirect might change, the client “ought to continue to use the target URI for future requests.” Unlike a 301, a 302 isn’t cached unless headers say so. Clients may change POST to GET when following it; 307 Temporary Redirect forbids that.

SEO impact

In Google’s HTTP status code documentation, a 302 is a weak signal that the target should be canonical. Usually Google keeps the original URL in its results, which is exactly right for a short detour. 303 and 307 get the same treatment.

The trouble starts when a permanent move is made with a 302: the old URL can linger in results and the new one takes longer to take over. Google has said it may eventually treat a long-standing 302 as permanent, but that’s not something to rely on. If the move is permanent, say so with 301 or 308.

Good uses for a 302

  • A/B tests that send part of the traffic to a variant URL; Google recommends 302 rather than 301 for these.
  • Seasonal or campaign pages that temporarily stand in for a section.
  • Sending logged-out users to a login page and back.
  • Pointing an out-of-stock product to a substitute for a short time.

For site-wide maintenance, don’t redirect everything to a “we’ll be back” page; return 503 instead.

Accidental 302s: check your defaults

Many tools send 302 unless you ask for something else, which is how permanent migrations end up temporary:

  • PHP: header('Location: …') sends 302 unless a 3xx status was already set.
  • Express res.redirect(), Laravel redirect() and Rails redirect_to default to 302.
  • Apache Redirect without a status is temporary.
  • Nginx rewrite … redirect gives 302; rewrite … permanent gives 301.
// PHP: make the intent explicit
header('Location: https://www.example.com/new-url/', true, 301);

# Nginx: a deliberate temporary redirect
location = /sale/ {
    return 302 /sale/black-friday/;
}

How to check

The redirect checker shows the status of every hop, so you can spot a 302 hiding inside a chain; the http-to-https hop is a common place for one. For migrations, paste the old URLs into the HTTP status checker and look for anything other than 301 or 308. A typical temporary redirect:

HTTP/1.1 302 Found
Location: https://www.example.com/sale/black-friday/
Cache-Control: no-store
Content-Length: 0

Frequently asked questions

Is a 302 redirect bad for SEO?

Not when the move really is temporary; then keeping the original URL in results is what you want. It becomes a problem when a permanent move is made with a 302, because the old URL can stay in search results longer.

Does a 302 pass link signals?

Google follows 302s, but because it usually keeps the original URL as canonical, signals stay with the original rather than moving to the target. For permanent moves, use 301 or 308.

What is the difference between 302 and 307?

Both are temporary. A 307 guarantees the client repeats the same method (a POST stays a POST), while a 302 lets clients switch to GET. Google treats them the same.