What Is a 308 Status Code?
The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.
Clients with link editing capabilities ought to automatically re-link references to the effective request URI1 to one or more of the new references sent by the server, where possible.
The server SHOULD generate a Location header field2 in the response containing a preferred URI reference for the new permanent URI. The user agent MAY use the Location field value for automatic redirection. The server’s response payload usually contains a short hypertext note with a hyperlink to the new URI(s).
A 308 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls3.
Note: This status code is similar to 301 Moved Permanently, except that it does not allow changing the request method from POST to GET.
- 1 Effective Request URI RFC7230 Section 5.5
- 2 Location RFC7231 Section 7.1.2
- 3 Calculating Heuristic Freshness RFC7234 Section 4.2.2
- Source: RFC738 Section 3
308 CODE REFERENCES
Symfony HTTP Status Constant
Apache HttpComponents Core
Learn more about the 308 permanent redirect status code with these FAQs:
What is the difference between a 308 status code and a 307 status code?
The difference between a 308 status code and a 307 status code is that the 308 status code instructs the client to use the same HTTP method for the new URL as was used for the original request, while the 307 status code instructs the client to use the same HTTP method for the new URL as was used for the original request, unless the request was a POST request, in which case the client should use a GET request for the new URL.
In other words, the 307 status code is less strict than the 308 status code when it comes to handling POST requests.
What is the difference between a 308 status code and a 301 status code?
The difference between a 308 status code and a 301 status code is in how they handle future requests to the original URL.
A 301 status code instructs the client to use the new URL for all future requests to the resource, while a 308 status code only requires the client to use the new URL for future requests using the same HTTP method as the original request.
In other words, a 308 status code is more specific about which HTTP method should be used for the new URL, while a 301 status code permanently redirects all future requests to the new URL regardless of the HTTP method used.
What is the difference between a 308 status code and a 302 status code?
The difference between a 308 status code and a 302 status code is intended use cases.
A 302 status code indicates that a resource has been temporarily moved to a new URL and that the client should continue to use the original URL for future requests. In contrast, a 308 status code indicates that a resource has been permanently moved to a new URL and that the client should use the new URL for all future requests using the same HTTP method as the original request.
The 308 status code is more appropriate when a permanent redirect is required, while the 302 status code is used for temporary redirects.
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs
Marketing Tips for Niche Industries
- Trucking Website Design Services That Help You Grow Online
- Web Design for PPE Companies: 5 Sales-Boosting Design Tips
- Web Design for Exercise Equipment Companies: Browse Services & Get Tips
- Web Design for Storage Facilities: Launch a Revenue-Driving Site
- Web Design for Pressure Washing Companies
- Web Design for Restoration Companies (+4 Tips for Success)
- Web Design for Flooring Companies – WebFX Design Services
- Web Design for Biotech Companies: How to Design a Biotech Site
- Web Design for Window and Door Companies: Inspire Your Site