Skip to content

3xx Redirection

302 Found

The resource is temporarily at a different URL.

What 302 means

A temporary redirect. Keep using the original URL in future. Like 301, clients may switch POST to GET; 307 prevents that.

Common causes

  • Login redirects, temporary maintenance pages, load balancing.

How to fix it

If you're calling an API

  • Follow the Location header (curl -L). If an API redirects you to a login page, your auth is missing.

If you run the server

  • Use 307 for APIs so the method and body are kept.

Should you retry?

Follow Location.

Example response

HTTP
HTTP/1.1 302 Found
Location: https://example.com/login

Related headers: Location.

Defined in: RFC 9110 (HTTP Semantics). 302 is a redirection.

Often confused with

HTTP 302 FAQ

What does HTTP 302 mean?

302 Found: The resource is temporarily at a different URL. A temporary redirect. Keep using the original URL in future. Like 301, clients may switch POST to GET; 307 prevents that.

Is 302 a client or server error?

Neither: 302 is a redirection response (3xx). Further action (usually following a new URL) is needed.

How do I fix a 302 error?

Follow the Location header (curl -L). If an API redirects you to a login page, your auth is missing.

Should I retry after a 302?

Follow Location.

Other 3xx status codes

All HTTP status codes