3xx Redirection
HTTP 302 Found
HTTP 302 Found is a temporary redirect: the resource is at another URL for now, and the original URL stays canonical.
What 302 Found means
Clients follow a 302 but keep using the original URL next time. Express res.redirect() sends 302 by default, which is a common reason permanent moves end up as temporary redirects.
Common causes
- res.redirect(url) without a status in Express.
- Login flows that send the user to a sign-in page and back.
- A/B tests, maintenance pages or geo routing.
How to fix or use it
Pass 301 or 308 explicitly for permanent moves. Keep 302 (or 307, which preserves the method) for genuinely temporary redirects.
Express (Node.js) example
// Temporary: send logged-out users to the login page
app.get('/dashboard', (req, res) => {
if (!req.user) return res.redirect(302, '/login?next=/dashboard');
res.render('dashboard');
});SEO impact
Google usually keeps the original URL indexed for a 302. If a 302 stays in place for a long time Google may treat it as permanent, but do not rely on that; use 301 for real moves.
