devkult_
tools29converters34

302 Found

3xx redirection

The resource is temporarily at another URL; keep using the original one for future requests.

302 is the temporary redirect. The client follows the Location header for this request but keeps the original URL: search engines keep indexing the old address, and browsers don't cache the redirect by default.

Historically, browsers turned a redirected POST into a GET. That quirk is why 303 and 307 exist — to make the intent explicit either way.

Class3xx Redirection
Retry?Not applicable
Cacheable by defaultNo — only with explicit Cache-Control
Response bodyAllowed
Defined inRFC 9110 §15.4.3 — 302 Found
Example response
HTTP/1.1 302 Found
Location: /login?next=%2Fdashboard

When you'll see it

  • Login flows that send users to a sign-in page and back.
  • Temporary maintenance or campaign pages.
  • Language or region redirects (/ → /en/).
  • Framework defaults: Express's res.redirect() sends 302.

How to use it well

  1. If the move is permanent, use 301 or 308 so search engines update their index.
  2. After a form POST, use 303 See Other to send the browser to a result page with GET.
  3. If the method must be preserved, use 307.

Useful here: 301 vs 302 vs 307 vs 308 · HTTP Status Checker · Fixing ERR_TOO_MANY_REDIRECTS

Send a 302 from your server

Express
res.redirect(302, "/login?next=%2Fdashboard");
Next.js route handler
return NextResponse.redirect(new URL("/login?next=%2Fdashboard", request.url), 302);
Flask
return redirect("/login?next=%2Fdashboard", code=302)
Go net/http
http.Redirect(w, r, "/login?next=%2Fdashboard", http.StatusFound)
nginx
return 302 /login?next=%2Fdashboard;

Check what a URL returns

Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.

curl -sI https://example.com/your-path | head -n 1

Frequently asked questions

Does a 302 hurt SEO?

A short-lived 302 is fine; Google keeps the original URL indexed. If a 302 stays in place for a long time, Google may start treating it like a 301 — but use 301 when you mean permanent.

302 vs 307?

Both are temporary. 307 guarantees the method and body are reused, so a POST stays a POST. 302 lets clients switch to GET, which browsers do.

Headers used with 302
Related status codes