DD
DevDash

HTTP 302 Found: What It Means and When You See It

Quick Answer

HTTP 302 Found (temporary redirect) means the resource is temporarily at a different URL. The client should continue using the original URL for future requests.

HTTP 302 vs 301 vs 307

HTTP 301 Moved Permanently tells browsers and search engines the URL has permanently moved - cache the new URL forever. HTTP 302 Found is a temporary redirect - do not cache the redirect, keep using the original URL for future requests. HTTP 307 Temporary Redirect is like 302 but explicitly preserves the HTTP method (a POST to a 302 redirect may become a GET; a POST to a 307 redirect remains a POST). Search engines pass PageRank through 301 redirects but not 302 redirects. Use 301 for permanent URL changes. Use 302 for A/B testing, maintenance pages, and conditional redirects. Use 307 for API endpoints that temporarily redirect POST/PUT requests.

When You See HTTP 302

Common scenarios: OAuth 2.0 authorization flow (server redirects to login page, then back to app with auth code), login/logout redirects (after POST /login -> 302 to dashboard), URL shorteners (bit.ly -> 302 -> destination), CDN routing (redirect to nearest edge node), feature flags (redirect 10% of traffic to new URL for A/B test), and HTTP to HTTPS redirects (though 301 is more common for this). In Next.js: redirect("/dashboard", { permanent: false }) generates a 307 for client navigation and 302 for server responses. In Express: res.redirect(302, "/new-url") or res.redirect("/new-url") (302 is the default).

302 in Code and SEO Impact

Express.js: res.redirect("/new-url") - default is 302. res.redirect(301, "/new-url") for permanent. Next.js (next.config.ts): { source: "/old", destination: "/new", permanent: false } generates 307/302. permanent: true generates 308/301. curl: curl -L https://example.com/old - the -L flag follows redirects. Without -L, curl shows the 302 response. Verify redirect: curl -I https://example.com/old - check Location header. SEO note: if you intend a permanent URL change, use 301 not 302 - search engines will not transfer ranking signals for 302 redirects.

Try the interactive tool

Convert any value instantly — no sign-up required

Open tool →

Frequently Asked Questions

Related Values

Want API access + no ads? Pro coming soon.