302
Found
3xx Redirection

What Does HTTP 302 Found Mean?

HTTP 302 Found (originally called "Moved Temporarily") indicates that the requested resource is temporarily located at a different URL, provided in the Location header. Unlike a 301, the client should continue using the original URL for future requests because the redirect is not permanent.

Browsers follow 302 redirects automatically but do not cache them as aggressively as 301s. Search engines keep the original URL in their index rather than replacing it with the redirect target.

Historically, many browsers converted POST requests to GET when following a 302 redirect. This behavior was technically incorrect according to the original HTTP spec. The 303 See Other and 307 Temporary Redirect codes were introduced to address this ambiguity.

Common Causes

How to Configure 302 Redirects

Nginx

# Temporary redirect during maintenance location /api { return 302 /maintenance.html; } # Geo-based redirect location = /store { if ($geoip_country_code = "DE") { return 302 /store/de; } return 302 /store/us; }

Apache (.htaccess)

# Temporary redirect Redirect 302 /old-promo https://example.com/current-promo # Using RewriteRule RewriteEngine On RewriteRule ^sale$ /summer-sale [R=302,L]

Express.js (Node.js)

// Login redirect pattern app.get('/dashboard', requireAuth, (req, res) => { // requireAuth middleware handles the 302 if not logged in: // res.redirect(302, `/login?redirect=${req.originalUrl}`); res.render('dashboard'); }); // After successful login app.post('/login', (req, res) => { // ...authenticate... const redirectUrl = req.query.redirect || '/dashboard'; res.redirect(302, redirectUrl); });

Verifying with curl

$ curl -I https://example.com/old-promo HTTP/1.1 302 Found Location: https://example.com/current-promo Cache-Control: no-cache

302 vs 301: Choosing the Right Redirect

The wrong redirect code can hurt your SEO or cause unexpected caching behavior:

Frequently Asked Questions

When should I use 302 instead of 301?
Use 302 when the redirect is temporary and the original URL should remain canonical. Common examples: login flows that redirect to a login page and then back, A/B tests where variants change, geo-redirects that vary by user, and maintenance pages. If the change is permanent, always use 301.
Does a 302 redirect pass SEO value?
Google has confirmed that 302 redirects do pass PageRank, similarly to 301s. However, the critical difference is indexing: Google keeps the original URL indexed with a 302, but replaces it with the destination URL for a 301. If a 302 persists for a very long time, Google may eventually treat it as a de facto 301.
What is the difference between 302 and 307?
Both are temporary redirects. The difference is method preservation. With 302, browsers are allowed to change POST to GET when following the redirect (and most do). With 307, the browser must use the same HTTP method for the redirected request. Use 307 when redirecting form submissions or API POST requests to ensure the data is re-sent correctly.

Related Status Codes

Related Tools