# HTTP 302 Found — Status Code Meaning & Examples

> 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.

- Class: 3xx Redirection
- Retry: Not applicable
- Cacheable by default: no
- Defined in: [RFC 9110 §15.4.3 — 302 Found](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.4.3)

## Example response

```http
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.

## 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;
```

## FAQ

### 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.

## Related status codes

- [301 Moved Permanently](https://www.devkult.com/http/301.md)
- [303 See Other](https://www.devkult.com/http/303.md)
- [307 Temporary Redirect](https://www.devkult.com/http/307.md)

Open the interactive page: https://www.devkult.com/http/302