The HTTP 308 status code stands for "Permanent Redirect". It is a redirection response indicating that the requested resource has moved permanently to a new URL, and the client must use the new URL for all future requests while preserving the original request method (e.g., POST remains POST).

When is HTTP 308 Used?

  • When a resource has been permanently moved, and the client should update bookmarks, links, or stored URLs.
  • Unlike HTTP 301, it ensures that the HTTP method does not change (e.g., a POST request remains a POST after redirection).
  • Useful for API versioning and permanent domain changes.

Example Scenarios

  • Permanent API Version Upgrade – An old API endpoint permanently moves to a new version.
  • Permanent Domain Change – A website permanently moves to a new domain.
  • Ensuring HTTP Method Consistency – Redirecting a POST request without changing it to GET.

Example

Client Request (POST to an API Endpoint)

    
        POST /api/v1/data HTTP/1.1
        Host: example.com
    

Server Response (Permanent Redirect, Keep Using POST)

    
        HTTP/1.1 308 Permanent Redirect
        Location: https://api.example.com/v2/data
    

Client Automatically Follows Redirect (Using POST, Not GET)

    
        POST /v2/data HTTP/1.1
        Host: api.example.com
    

Summary

HTTP 308 means the requested resource is permanently moved, and all future requests should use the new URL while keeping the original HTTP method. It is commonly used for permanent API migrations, domain changes, and enforcing method consistency in redirections.