Protocols
Saved & recent

HTTP redirects

Also called: HTTP redirection, Location redirect

An HTTP redirect asks the client to make another request, usually to the address in Location. Status codes communicate whether the move is temporary or permanent and how the method is handled. A 307 or 308 preserves the method and body; 303 points to a retrieval request. Historical 301 and 302 behavior can change POST to GET.

For example, after accepting a submitted form, a server can return 303 pointing to a receipt that the browser fetches with GET. A permanent move of an API operation may use 308 when preserving the method matters. Redirects add requests and can form loops; not every 3xx response redirects to another address.

Read first
HTTP
Related
HTTP methods, HTTP status codes, Web proxy
Further reading
MDN — Redirections in HTTP
303 · see other POST /form 303 · Location: /receipt GET /receipt follow-up reads the receipt 308 · permanent redirect POST /old-api · request body 308 · Location: /new-api POST /new-api · same body method and body preserved
Two example redirect flows: 303 leads from POST to a GET receipt; permanent 308 keeps POST and the same body at the new API location. Each arrow represents a later exchange, not an internal server rewrite.

View in the full Protocols collection