308 Permanent Redirect
Permanent redirect that keeps the original method and body.
| Class | Redirection (3xx) |
|---|---|
| Defined in | RFC9110, Section 15.4.9 |
| Cacheable by default | Yes (RFC 9110, section 15.1) |
Common causes
- A permanent redirect that must keep the method and body.
- Moving an API endpoint without breaking POST clients.
What to do
Use it instead of 301 when clients may send non-GET requests. Like 301, it is cached, so be sure the move is permanent.
Related codes
- 301 Moved Permanently: The resource has moved permanently to the URL in the Location header.
- 307 Temporary Redirect: Temporary redirect that keeps the original method and body.
- 302 Found: The resource is temporarily at a different URL, given in the Location header.