308

Permanent Redirect

3xx Redirection

Back to list

Server perspective

Use 308 for permanent redirects when the redirected request must preserve the original method and body.

When to use

  • Return 308 for durable API or route migrations where non-GET requests must keep their semantics
  • Prefer 308 over 301 when clients should permanently update their target URI without method ambiguity

How to respond

  • Include a Location header with the new permanent URI
  • Keep the new target stable enough that clients can safely update stored endpoints

Headers to consider

  • Location
  • Cache-Control

Response body

  • A body is optional, but the permanent target must be clear from Location

Server-side pitfalls

  • Do not use 308 for temporary rerouting
  • Do not choose 301 if preserving non-GET methods is part of the contract

Examples

Permanent write endpoint migration

Request:POST /api/v1/orders
Response:308 Permanent Redirect with Location: /api/v2/orders

The server provides a long-term redirect that keeps the request semantics intact.

References

Related 3xx Redirection Codes