308 Permanent Redirect
Server sends the 308 Permanent Redirect status code to inform the client that the requested resource has been moved to a new permanent location.
The 308 Permanent Redirect status code is sent by the server to inform the client that the requested resource has been moved to a new permanent location.
This means that any future requests for the same resource should be made to the new URL provided in the response.
When you receive the 308 Permanent Redirect status code, it means that the requested resource has been permanently moved to a new location. Your browser or application should automatically update the stored links to the new URI provided in the response's Location header.
Unlike the 301 Moved Permanently status code, the 308 Permanent Redirect requires you to make an identical HTTP request to the new location, maintaining the same method (e.g., GET or POST) used in the original request. This ensures that the server processes the subsequent request correctly.
In the example, when the client tries to access an HTML resource, the server informs that the resource has permanently moved to a new web address.
The server includes the new address in the response's Location header. Although some browsers may display a message suggesting updating bookmarks, most modern browsers will automatically redirect to the new location, making the process seamless for users.
Request
GET /news.html HTTP/1.1
Host: www.example.com
Response
HTTP/1.1 308 Permanent Redirect
Location: http//www.example.com/feeds/news.html
Content-Type: text/html; charset=UTF-8
Content-Length: 150
< h1>The Newsfeed has moved
< body>
The newsfeed has moved permanently to < a href=/feeds/news.html>here. Please update your bookmarks.
In conclusion, the 308 Permanent Redirect status code is used by servers to indicate that a requested resource has permanently moved to a new location.
When users encounter this status code, their web browsers will automatically update the URL, ensuring a seamless transition to the new location without any manual intervention needed.