HTTP status code 308 indicates that the requested resource has been permanently moved to a new location specified by the Location
header. Similar to 301 “Moved Permanently,” the 308 status code signifies that the resource’s move is permanent, but it specifically emphasizes that the original request method should not change during the redirection. For example, if the original request is a POST, the redirected request should also be a POST, whereas a 301 redirect may be incorrectly handled as a GET by some older browsers or clients.
Introduction of 308 Status Code
The 308 status code was officially introduced in 2015 to more clearly indicate that the request method should remain unchanged during redirection. It is often used for SEO (Search Engine Optimization) purposes, as it helps maintain the link equity of the original resource when it is permanently moved, passing it to the new URI.
Common Use Cases for 308 Status Code
-
Website Migration: When a site is migrated or a domain is changed, and both users and search engines should be directed to the new address in future requests.
-
Form Submission or File Uploads: This status code is suitable for operations like form submissions or file uploads, which typically use the POST method and require the request method to remain unchanged.
Important Considerations
While the 308 status code is relatively new, not all browsers fully support it, so compatibility issues may need to be considered in certain scenarios.