308 Permanent Redirect HTTP Status Code

Description

HTTP status code 308 is known as "Permanent Redirect." It indicates that the resource requested has been definitively moved to the URL specified by the Location headers. Unlike the 301 status code, which can also be used to indicate a permanent redirect, a 308 status code ensures that the method and the body of the original request are reused in the subsequent request to the new URL. This means that if the original request was a POST, the new request will also be a POST with the same data, rather than being converted into a GET request, which could happen with some 301 redirects. The 308 status code was defined in RFC 7538.

Status

HTTP
308 Permanent Redirect

Common Causes

Here are the primary reasons a server might return a 308 status code:

  1. Resource Moved Permanently: The most straightforward reason for a 308 response is that the resource the client attempted to access has been permanently moved to a new location. This is a way for web servers to tell clients (like browsers) that they should update their bookmarks or stored links to the new URL.

  2. SEO and Link Equity Preservation: When websites undergo reorganization, consolidation, or migration to new domains, 308 redirects are used to ensure that search engines update their indexes to point to the new URLs. It helps in preserving the search ranking and link equity that the original URL had accrued over time.

  3. Enforcing Consistent URL Use: Websites might use 308 redirects to enforce a consistent scheme for accessing resources. For example, redirecting from http to https versions of a site, or ensuring that all URLs use a www prefix (or vice versa).

  4. Method Preservation: Unlike some other types of redirects (like 302), a 308 redirect requires that the method and body of the original request are reused for the new request. This is particularly important for non-GET requests (like POST, PUT, or DELETE) where the intent is to perform an action that should not change with the URL redirection.

  5. Protocol Requirements: In some cases, a 308 status might be used to meet certain protocol-level requirements or to comply with the policies of an application. This could include redirecting from an outdated API endpoint to a new version, ensuring clients use the most current and supported interfaces.

Remember, while 308 is similar to the 301 status code ("Moved Permanently"), the key difference lies in how the method of the request is treated. A 308 redirect ensures that the method of the request (e.g., GET, POST) is not changed in the subsequent request to the new URL, making it more suitable for certain types of requests where this behavior is necessary.

Browser Support

The following table will show you the current browser support for the 308 Permanent Redirect HTTP status code.

Desktop
Edge Chrome Firefox Opera Safari
YesYesYesYesYes
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
YesYesYesYesYesYes

Last updated by CSSPortal on: 31st March 2024