The 308 Permanent Redirect status code is an HTTP response code
that indicates a permanent redirection of a resource. This
status has the same semantics as the 301 Moved Permanently HTTP
response code, with the exception that the user agent must not
change the HTTP method used.
Here are some key points about the 308 Permanent Redirect status
code:
- Purpose: The primary purpose of using this
status code is to inform clients (web browsers or search
engine crawlers) that the requested resource has been
permanently moved to another location, and future requests
should be made to that new URL. The 308 status code ensures
that the original request method is maintained when
redirecting.
- Preserve HTTP method: Unlike a 301 redirect,
which also signifies permanent redirection, a 308 redirect
instructs the client to use the same HTTP method for future
requests as used in the original request. This means if the
initial request was made using a GET method, subsequent
requests should also be made with GET. The purpose of this
status code is to ensure that clients do not unintentionally
change their request methods when following redirects.
- SEO Impact: Search engines treat a 308
redirect as a permanent move and update their index
accordingly by transferring link equity from the old URL to
the new one. This helps in preserving search rankings for
websites implementing permanent redirects. Be aware also that
if there are more than 5 hops (each redirect in the chain is
referred to as a “hop.”) in a chain, Googlebot will not land
on the destination URL.
- User experience: When encountering a web page
with a 308 response, web browsers typically follow it
automatically without user intervention or displaying any
message alerting them about redirection.
- Caching behavior: Clients should not cache
responses containing this status code unless they explicitly
include appropriate Cache-Control or Expires headers
indicating caching is allowed. When a client (such as a web
browser) receives a 308 response, it understands that the
original requested URL should never be accessed again and must
always redirect to the new URL provided in the response's
Location header field.
- Latency: In terms of latency, a redirect can
introduce additional time overhead as it requires an extra
round trip between the client and server. When a client
receives a 308 response, it needs to make another request to
the new URL before getting access to the desired resource.
This redirection process adds some delay in completing the
initial request.
- Similar status codes:
- 301 Moved Permanently: This status code
implies a permanent redirect, where the original URL is no
longer valid, and clients should use the new URL for all
future requests.
- 302 Found: Similar to 307 Temporary
Redirect but does not instruct clients to preserve the
original request method (GET/POST) when following the
redirection.
- 307 Temporary Redirect: Similar to 302
Found but explicitly instructs clients to preserve the
original request method (GET/POST) when following the
redirection.
In summary, the 308 Permanent Redirect status code indicates
that the target resource has been permanently moved to a new
location. It instructs the client to update its references and
use the new URL for future requests.