302 Found

Redirect - Resource temporarily at different URL

HTTP 302 Found

What It Means

The HTTP 302 Found status code indicates that the requested resource temporarily resides at a different URL. Unlike 301, the client should continue using the original URL for future requests.

When to Use 302

  • A/B testing: Redirecting users to different page variants
  • Maintenance pages: Temporarily showing a maintenance page
  • Geolocation: Redirecting based on user location
  • Login redirects: Sending users to login before accessing content
  • Cart/checkout: Redirecting after adding to cart

Example Response

HTTP/1.1 302 Found
Location: https://example.com/temporary-page
Cache-Control: no-cache

<html>
<body>
  Redirecting to
  <a href="https://example.com/temporary-page">here</a>...
</body>
</html>

302 vs 301: Key Differences

Aspect 301 302
Duration Permanent Temporary
Browser caching Cached indefinitely Not cached by default
SEO value Transferred to new URL Stays with original URL
Search indexing New URL indexed Original URL stays indexed

302 vs 307

302 may change POST to GET during redirect (historical browser behavior).

307 preserves the HTTP method. If you need to redirect a POST and maintain the method, use 307.

Implementation Examples

Express.js

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

Python Flask

from flask import redirect

@app.route('/promo')
def promo():
    return redirect('/current-sale', code=302)

PHP

header('Location: /current-sale', true, 302);
exit;

Common Mistakes

  • Using 302 for permanent moves: Hurts SEO, use 301
  • Redirect loops: Check that target doesn't redirect back
  • Missing Location header: Required for all 3xx redirects

Frequently Asked Questions

What does HTTP 302 Found mean?
HTTP 302 Found indicates that the requested resource temporarily resides at a different URL. The client should continue using the original URL for future requests, as the redirect is not permanent.
When should I use 302 vs 301?
Use 302 for temporary redirects such as A/B testing, maintenance pages, login redirects, or geo-based routing. Use 301 when the URL change is permanent. Using 302 for permanent changes wastes SEO value because search engines keep the old URL indexed.
What is the difference between 302 and 307?
Both are temporary redirects, but they differ in how they handle the HTTP method. A 302 may change the method from POST to GET during redirect (due to historical browser behavior). A 307 guarantees the method is preserved. Use 307 when you need to redirect a POST request and maintain the POST method.
Does 302 pass SEO value?
302 redirects do not pass link equity to the new URL. Search engines keep the original URL indexed and assume the redirect is temporary. If you accidentally use 302 for a permanent move, you lose the SEO benefit of properly redirecting with 301.
How do I monitor temporary redirects?
UptimeSignal follows redirects and monitors the final destination. You can configure it to alert if the redirect chain changes, the destination returns an error, or the redirect loop is detected.

Track your redirect chains

Catch broken redirects and redirect loops before they impact users with UptimeSignal.

Start monitoring free →

Related Status Codes

More Resources