HTTP 302 Found — What It Means & How to Debug
HTTP 302 Found (temporary redirect) tells the client the resource is temporarily available at a different URL — browsers redirect but keep the original URL for future requests.
What It Means
The HTTP 302 Found status code is a temporary redirect response. It tells the client that the requested resource resides temporarily at a different URL provided in the Location header. Unlike the 301 Moved Permanently, a 302 redirect does not indicate permanence — clients should continue using the original URL for future requests.
Browsers and HTTP clients automatically follow the redirect, but they keep the original URL as the canonical location. Search engines do not transfer PageRank or indexing signals through 302 redirects — they treat the original URL as the authoritative one.
When It’s Sent
- Temporary maintenance pages — redirecting users to a downtime notice
- A/B testing — sending a percentage of traffic to a different variant
- Login redirects — sending users to the login page and back after authentication
- Geolocation-based routing — redirecting to a regional subdomain temporarily
- Session-based pages — redirecting to a dynamically generated temporary URL
Real Example
curl -v http://example.com/maintenanceExpected response:
> GET /maintenance HTTP/1.1
> Host: example.com
>
< HTTP/1.1 302 Found
< Location: https://example.com/temporary-down.html
< Content-Length: 0
<The browser follows the redirect to /temporary-down.html but remembers that /maintenance is the original URL to use in the future when the temporary page is removed.
How to Debug
Browser DevTools
- Open the Network tab and enable Preserve log
- Navigate to the URL
- Look for status
302 Foundin the request list - Check the
Locationheader to see where it redirects - A subsequent request to the new URL appears automatically
curl
curl -I http://example.com/temp-pageThe Location header shows the redirect target. Use -L to follow the redirect:
curl -L http://example.com/temp-page -o /dev/null -w "Final status: %{http_code}"Postman
Turn off Automatically follow redirects in Settings to capture the 302 and inspect the Location header. Turn it on to see the final response.
How to Fix
If you encounter an unexpected 302 redirect:
- Server-side (Nginx): Look for
return 302orrewritedirectives — check if maintenance mode is enabled - Server-side (Express): Search for
res.redirect(302, ...)— often used in authentication middleware - A/B testing tools: Check if an A/B testing platform or feature flag is routing traffic to a variant
- Session middleware: Verify the user has a valid session — many apps redirect unauthenticated users with a
302 - Geolocation rules: Check CDN or server config for location-based redirect rules
Common Causes
| Scenario | What Happens | Why It Matters |
|---|---|---|
| Maintenance mode | All requests get 302 to a maintenance page | Users see a downtime notice instead of the app |
| Login required | Unauthenticated users get 302 to /login | Protects private resources |
| A/B test variant | 50% of traffic gets 302 to variant B | Tests different page versions |
| Language redirect | User gets 302 to localized URL based on browser language | Shows content in the user’s preferred language |
| Payment redirect | After checkout, user gets 302 to payment gateway | Completes the purchase flow |
FAQ
Related Codes
- HTTP 301 Moved Permanently — permanent redirect, transfers SEO
- HTTP 307 Temporary Redirect — temporary redirect, preserves HTTP method
- HTTP 308 Permanent Redirect — permanent redirect, preserves HTTP method
- HTTP 404 Not Found — what the target should return if the redirect points to a missing page
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro