What Is a 302 Redirect? When to Use Temporary Redirects

What the HTTP 302 status code means, how browsers and search engines handle temporary redirects, when to use 302 vs 301, and the difference between 302 and 307.

A 302 redirect tells the browser: "The page you asked for is temporarily at a different URL. Use the new one for now, but keep the old URL in your records because it will come back." The server sends a Location header with the temporary destination, the browser follows it, and life goes on.

The official name for the 302 status code is 302 Found. Older specs called it "302 Moved Temporarily," and you will still see that label in some documentation. The meaning is the same either way: this redirect is not permanent.

For a side-by-side comparison of all redirect status codes, see our HTTP Redirect Guide and HTTP Redirect Status Codes.

The HTTP response

Here is what a 302 response looks like on the wire:

HTTP/1.1 302 Found
Location: https://example.com/temporary-destination
Content-Length: 0
Date: Mon, 21 Apr 2026 12:00:00 GMT

The two parts that matter:

  • Status line (302 Found): Tells the client this is a temporary redirect. The resource has not permanently moved.
  • Location header: The URL where the browser should go instead. The browser will make a new request to this URL automatically.

The response body is usually empty or contains a short HTML fallback with a link for clients that do not follow redirects automatically.

What the spec says

RFC 9110 defines the 302 status code in Section 15.4.3: [1]

The 302 (Found) status code indicates that the target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client ought to continue to use the target URI for future requests.

Two things to pull out of that:

  1. The redirect is temporary. The original URL is still the official one.
  2. Clients should keep using the original URL for future requests. They should not update bookmarks or cached references to point to the new URL.

The spec also notes that for historical reasons, browsers may change the request method from POST to GET when following a 302. This is relevant if you are handling form submissions. More on that below.

How browsers handle a 302

When a browser receives a 302:

  1. It reads the Location header
  2. It makes a new request to that URL
  3. It does not cache the redirect by default
  4. On the next visit to the original URL, it contacts the server again (it does not skip ahead to the redirect destination)

That last point is the key difference from a 301. A 301 can be cached aggressively, meaning the browser might skip the server entirely and go straight to the new URL. A 302 is checked with the server every time, so if you remove the redirect, visitors will go back to the original page on their next visit.

The method-change quirk

When the original request is a POST and the server responds with a 302, browsers will change the method to GET for the redirected request. This means the POST body gets dropped.

POST /form-handler  -->  302 Found  -->  GET /thank-you
                                          (body is gone)

This behavior started as a browser convention that contradicted the original HTTP/1.0 spec. The current spec (RFC 9110) acknowledges it as acceptable. [1]

If you need a temporary redirect that preserves the POST method and body, use a 307 Temporary Redirect instead. If you want the browser to switch to GET on purpose (like after a form submission), a 303 See Other is the semantically correct choice.

For standard page-to-page redirects where every request is a GET, the method-change behavior is irrelevant. GET stays GET through a 302.

How Google handles a 302

Google treats 302 redirects differently from 301 redirects. The difference has a direct impact on which URL appears in search results. [2]

Indexing

When Googlebot encounters a 302, it keeps the original URL in its index. It does not replace it with the redirect destination. Google trusts that the redirect is temporary and that the original URL will eventually return to serving content directly.

If Google sees a 302 that stays in place for a long time (months or years), it may eventually treat it as a 301 and swap the URLs in its index. But this is not guaranteed, and the timeline is unpredictable. If you want Google to swap URLs promptly, use a 301.

Link equity

Google has said that 301 redirects pass full ranking signals. [3] For 302 redirects, the situation is less clear-cut. Google can pass ranking signals through 302s, but there is less certainty about how consistently it does so compared to 301s.

If you are moving a page permanently and care about preserving its search rankings, use a 301. If the page is genuinely coming back and you need a temporary redirect, a 302 is correct and the SEO implications are minimal because the original URL stays in the index.

The accidental 302 problem

One of the most common redirect mistakes is using a 302 when a 301 is needed. A developer moves a page permanently but configures a 302 (either by accident or because their framework defaults to 302). The result: Google keeps indexing the old URL, link equity transfer is uncertain, and the new URL may not rank as well as it should.

If the move is permanent, use a 301. There is no ambiguity. For more on this, see 301 vs 302 Redirects and Redirect SEO Impact.

When to use a 302

A/B testing and experiments

You want to send some visitors to version A of a page and others to version B. The original URL stays the same. The redirect is temporary because the test will end and traffic will go back to a single version.

/landing-page --302--> /landing-page-variant-b  (for 50% of visitors)

A 302 tells search engines to keep indexing the original URL, which is what you want. You do not want Google to index a test variant.

Maintenance and downtime pages

Your site is undergoing maintenance. You redirect all traffic to a maintenance page for a few hours. When the work is done, you remove the redirect.

/*  --302-->  /maintenance

Using a 301 here would be a disaster. Browsers would cache the redirect, and even after maintenance ends, some visitors would keep seeing the maintenance page. A 302 ensures the browser checks back with the server each time.

Geolocation-based routing

You detect that a visitor is in Germany and redirect them to the German-language version of the site. The redirect is temporary because the same URL should serve different content based on who is visiting.

/products  --302-->  /de/produkte  (for visitors in Germany)

A 301 would tell browsers and search engines that /products has permanently moved to /de/produkte, which is not true. It has only temporarily moved for this specific visitor.

Seasonal and promotional pages

During Black Friday, your homepage redirects to a sale page. After the event, it goes back to the normal homepage.

/  --302-->  /black-friday-sale  (November 25-30)

Login and authentication flows

An unauthenticated user tries to access /dashboard. You redirect them to /login. After they log in, they should be able to access /dashboard directly. The redirect is conditional and temporary.

Feature flags and gradual rollouts

You are rolling out a new checkout flow to 10% of users. The other 90% go to the old checkout. The redirect changes based on the rollout percentage and will be removed entirely once the new flow is fully deployed.

When NOT to use a 302

Permanent page moves

If you renamed /blog/old-title to /blog/new-title and the old URL is never coming back, use a 301. A 302 will work for visitors (they still get to the right page), but search engines will keep indexing the old URL and may not transfer full ranking signals to the new one.

Domain migrations

Moving from oldsite.com to newsite.com is a permanent change. Every redirect should be a 301. Using 302 for a domain migration is one of the most common and costly redirect mistakes in SEO.

HTTP to HTTPS upgrades

Redirecting http:// to https:// is permanent. Use a 301. See HTTP to HTTPS Redirect Guide.

URL structure changes

If you are reorganizing your URL scheme (/blog/posts/123 to /articles/123), that is a permanent change. Use a 301.

The rule of thumb: if you cannot picture a scenario where you would remove the redirect and have the old URL serve content again, it is not temporary. Use a 301.

302 vs 301

The differences boil down to three things:

| | 301 | 302 | |---|---|---| | Permanence | Permanent | Temporary | | Browser caching | Cached (often aggressively) | Not cached by default | | Google indexing | New URL replaces old URL in index | Old URL stays in index |

Both status codes tell the browser to follow the Location header. The difference is in what the browser and search engines remember afterward.

For the full comparison, see 301 vs 302 Redirects.

302 vs 307

Both 302 and 307 are temporary redirects. The difference is how they handle the HTTP method.

  • 302: Browsers may change POST to GET when following the redirect. In practice, all major browsers do this.
  • 307: Browsers must preserve the original method. A POST stays a POST. The request body is preserved.

For regular page-to-page redirects (GET requests), 302 and 307 behave identically. The distinction only matters when the original request uses POST, PUT, or another non-GET method.

Use 302 for standard temporary page redirects. Use 307 when you are redirecting API requests, form submissions, or anything where preserving the HTTP method matters.

Implementation examples

Apache (.htaccess)

# Single page redirect
Redirect 302 /sale https://example.com/black-friday

# Pattern-based redirect
RewriteEngine On
RewriteRule ^old-section/(.*)$ /new-section/$1 [R=302,L]

Nginx

# Single page redirect
location = /sale {
    return 302 https://example.com/black-friday;
}

# Conditional redirect (maintenance mode)
if ($maintenance = "on") {
    return 302 /maintenance;
}

Node.js / Express

app.get('/sale', (req, res) => {
  res.redirect(302, '/black-friday');
});

Note: Express defaults to 302 if you do not specify a status code. res.redirect('/black-friday') sends a 302.

PHP

<?php
header('HTTP/1.1 302 Found');
header('Location: https://example.com/black-friday');
exit;
?>

Verifying a 302

Use curl to check the status code and destination:

curl -I https://example.com/sale

You should see:

HTTP/1.1 302 Found
Location: https://example.com/black-friday

To follow the full chain:

curl -I -L https://example.com/sale

If the 302 is part of a longer redirect chain, you will see each hop listed in order.

Watch for accidental 302s on permanent moves

Many web frameworks and server configurations default to 302 for all redirects. If you are setting up a permanent redirect, double-check that the status code is 301, not 302. An accidental 302 on a permanent move will not break anything for users, but it will confuse search engines and may cost you rankings.

Troubleshooting 302 issues

"Google is indexing the redirect destination instead of the original URL"

If a 302 stays in place for a very long time, Google may decide to treat it as a permanent redirect and swap the URLs. If the redirect is genuinely temporary, this is a problem. Consider whether the redirect is still needed. If it is permanent after all, switch to a 301.

"My 302 redirect is being cached"

Some CDNs and reverse proxies cache 302 responses by default. Check your CDN configuration. If the 302 needs to be evaluated on every request (like a geolocation redirect), set explicit no-cache headers:

Cache-Control: no-cache, no-store, must-revalidate

"POST data is lost after the 302"

This is expected behavior. Browsers change POST to GET when following a 302. If you need the POST to stay a POST, use a 307 Temporary Redirect.

"The redirect works in one browser but not another"

Unlikely for 302 since all browsers handle it the same way, but possible if caching is involved. Clear the browser cache and test again. Also check if a browser extension is interfering.

The bottom line

A 302 redirect is the right tool when a page is temporarily somewhere else and will come back. Search engines keep the original URL indexed, browsers do not cache the redirect, and removing it returns everything to normal. The most important thing to get right is whether your redirect is truly temporary. If the old URL is never coming back, use a 301 and save yourself the SEO headache.

References

  1. IETF, "RFC 9110 - HTTP Semantics, Section 15.4.3: 302 Found," June 2022. https://httpwg.org/specs/rfc9110.html#status.302
  2. Google, "Redirects and Google Search," Google Search Central, 2024. https://developers.google.com/search/docs/crawling-indexing/301-redirects

Never miss a broken redirect

Trace redirect chains and detect issues before they affect your users and SEO. Free instant tracing.

Try Redirect Tracer