HTTPfy

302 Found

The resource is temporarily at the URL in the Location header; keep using the original URL.

302 at a glance

Code
302
Name
Found
Class
3xx Redirection
Status
IANA-registered standard code
Defined in
RFC 9110, Section 15.4.3
Cacheable by default
No by default. Caches store it only when the response carries explicit freshness (Cache-Control max-age, s-maxage or Expires).

What 302 means

302 Found is a temporary redirect: the client should follow Location for this request but keep requesting the original URI later. Search engines keep the original URL indexed. Browsers change POST to GET when following a 302 (behaviour RFC 9110 now allows), which is why 303 and 307 exist to make intent explicit. 302 is not cached unless Cache-Control or Expires says so.

What typically causes a 302

  • The default redirect in most frameworks: Flask redirect(), Express res.redirect(), Django redirect(), PHP header('Location: ...').
  • Login walls sending unauthenticated users to a sign-in page.
  • Geo or language redirects and A/B testing.
  • OAuth and SSO flows bouncing between identity provider and app.

Fix it on the server

  • Use 301 or 308 for permanent moves so search engines update their index.
  • Use 303 after a form POST and 307 if the method must be preserved.
  • Watch for redirect loops between two 302s, e.g. an app forcing HTTPS behind a proxy that talks HTTP to it; trust X-Forwarded-Proto.

Fix it as a client or visitor

  • "Too many redirects" usually means a 302 loop; inspect the chain with curl -sIL.
  • API clients that follow redirects will turn POST into GET on 302; send requests to the final URL directly.

Headers that go with 302

HeaderRole
LocationTemporary target URL.
Set-CookieOften set alongside login redirects.

Example response

HTTP/1.1 302 Found
Location: /login?next=%2Fdashboard
Content-Length: 0

Opens the HTTP headers tool with your URL filled in; it shows the status line and headers of every redirect hop.

Checking a whole domain's redirects? The HTTP status checker follows http, https, www and non-www variants and shows every hop.