302 Found
The target resource resides temporarily under a different URI.
Usually happens because:
- ☑ Temporary promotions or maintenance updates
- ☑ Redirecting users to login pages
- ☑ Locale or language routing checks.
🔍 Quick Checklist:
Meaning
The HTTP 302 Found redirect status code indicates that the resource requested resides temporarily under a different URI. Since the redirection might be altered in the future, the client should continue to use the original URI for future requests.
Root Causes
- Temporary promotions or maintenance updates redirecting users.
- Redirecting users to login pages when access checks fail.
- Locale or language routing checks.
| Cause | Frequency |
|---|---|
| Temporary promotions or maintenance updates | ⭐⭐⭐⭐⭐ |
| Redirecting users to login pages | ⭐⭐⭐⭐ |
| Locale or language routing checks. | ⭐⭐⭐ |
Common Mistakes
- Using 302 instead of 301 for domain changes (causes search engines to index both domains, triggering duplicate content penalties).
- Expecting the browser to preserve request body payloads during 302 redirects.
How to Fix
Framework-Specific Examples
Express temporary redirection.
app.get('/dashboard', (req, res) => {
res.redirect(302, '/login');
});Server Configuration Examples
Temporary rewrites inside Nginx config.
rewrite ^/old-temp-path$ /new-temp-path redirect;Prevention
- Always default to 302 for auth/login redirection scenarios.
- Use 307 Temporary Redirect if the HTTP request method must be preserved.
Frequently Asked Questions (FAQ)
Q: Is HTTP 302 cached by browsers?
No. Browsers do not cache 302 redirects by default, meaning every request will contact the server first to check if the route location has changed.
Q: Does 302 pass SEO Link Equity?
Yes, but significantly less than 301. Search engines understand that 302 is temporary, so they keep index credit on the original URL.
Q: Why does a 302 redirect convert POST requests to GET?
This is a legacy behavior defined in early HTTP specs. Browsers change POST to GET to prevent form re-submission loops.
Q: When should I use 302 vs 303?
Use 303 See Other specifically after POST request submissions to guide browsers to load a success view via GET.