What 308 means
Like 301, but the method and body must be kept. The right permanent redirect for API endpoints.
Common causes
- An endpoint moved permanently (new domain, version or path).
How to fix it
If you're calling an API
- Update your code to the new URL.
If you run the server
- Use 308 instead of 301 when clients send POST, PUT or PATCH.
Should you retry?
Repeat the request at Location, then update your URL.
Example response
HTTP/1.1 308 Permanent Redirect
Location: https://api.example.com/v2/itemsRelated headers: Location.
Defined in: RFC 9110 (originally RFC 7538). 308 is a redirection.