301 Moved Permanently and
308 Permanent Redirect HTTP response status codes are used to indicate that the requested resource has been permanently moved to a new URL (as specified by the Location headers). The main difference between the two is that:
301may sometimes (incorrectly) change a
POSTrequest into a
308does not allow the HTTP method (or the request body) to be changed.
Therefore, you should choose
308 when you're dealing with
POST requests, and choose
308 is useful when submitting a form to a permanently redirected resource where you would want the client to make a
POST request with the same request body to the new, redirected location. Doing the same with
301, however, might be problematic as the client may choose to change
GET (which is typically the case).
Specifying either of these is good for SEO as the indication that the resource has permanently moved to a new URL helps search engines update their links to the resource.
Some old browsers (and other clients such as crawlers, etc.) may not understand the HTTP response status code
308 as it is fairly new (introduced in April 2015). As a result, they may not follow the redirect. In such a case, you can use
Hope you found this post useful. It was published . Please show your love and support by sharing this post.