URL shortener
Also known as: 308 Permanent Redirect, status 308

HTTP 308

HTTP status 308 Permanent Redirect is the strict, method-preserving sibling of 301: it signals a permanent move while forbidding the client from rewriting the HTTP method or body when following.

308 was added to HTTP/1.1 precisely to fix a historical ambiguity around 301 and 302, where many clients silently rewrote `POST` requests to `GET` when following. For APIs that redirect write operations — think a `PUT /api/v1/resource` that needs to land on `/api/v2/resource` — that method rewrite silently lost the request body. 308 solves this by specifying that the client MUST preserve the method and retransmit the body to the new `Location`. Like 301, 308 carries full ranking transfer for search engines and is aggressively cached by browsers and CDNs; reversing it means waiting for caches to expire. Because 308 preserves `POST`, clients are obligated to prompt the user before following if the payload is sensitive — the spec phrases this as `the request should not be automatically repeated without user confirmation`. 308 is the right status for permanent API versioning moves, hostname migrations where form posts must survive, and anywhere strict RFC-compliant redirect semantics are required. For simple permanent redirects of static pages, 301 remains the more common choice out of familiarity and CDN edge compatibility.

Examples

  • A versioned API replying `308 Permanent Redirect` from `/v1/orders` to `/v2/orders` so `POST` payloads survive.
  • Migrating a hostname where form submissions and webhooks must arrive at the new host with their bodies intact.

Related terms