HTTP 302 · 3XX RFC 9110 §15.4.3 Cacheable: Only with explicit Cache-Control Retryable: Follow Location header

HTTP 302 Found: Root Causes & Production Fix Guide

HTTP 302 Found indicates a temporary redirect, commonly used for OAuth login flows, A/B routing, and geo-redirects. Unlike 307, browsers historically rewrite POST to GET when following a 302.

Top Root Causes of HTTP 302

Nginx Temporary Maintenance 302 Redirect

location /promo-old {
    add_header Cache-Control "no-store" always;
    return 302 https://example.com/promo-new;
}

Verify with cURL

curl -i -sS https://example.com/promo-old

Interactive Stack Diagnoser (HTTP 302)

Frequently Asked Questions

What is the difference between 302 Found and 307 Temporary Redirect?

302 allows user agents to change POST to GET when following the redirect, whereas 307 strictly preserves the original HTTP method and request body.

Why is my API returning 302 to /login instead of 401?

Web frameworks like Rails, Laravel, or Spring Security default to HTML form login redirects. Configure JSON/API routes to return 401 Unauthorized.

Is 302 cached by browsers?

Not by default unless you explicitly attach Cache-Control or Expires headers.

Related Status Guides & Header Tools