HTTP 308 Permanent Redirect — Permanent Method-Preserving Redirect
Informational3xx redirection
Overview
HTTP 308 Permanent Redirect permanently redirects to a new URI while preserving the HTTP method and request body, the permanent version of 307.
Key Details
- 308 is the permanent equivalent of 307 — method and body are preserved
- Unlike 301, a POST redirected with 308 stays as POST at the new URL
- Browsers and clients should update bookmarks and links to the new URI
- Search engines treat 308 as a permanent redirect and transfer link equity
- Defined in RFC 7538 as a supplement to the original HTTP redirect codes
Common Causes
- Permanently moving an API endpoint that receives POST/PUT/DELETE requests
- Domain migration where non-GET requests must be preserved
- Restructuring URL paths for APIs that handle multiple HTTP methods
- Consolidating duplicate endpoints while maintaining method semantics
Steps
- 1Use 308 in server config when permanently moving endpoints that handle POST/PUT
- 2For Apache: Redirect 308 /old-api /new-api in .htaccess
- 3For Nginx: return 308 https://newdomain.com$request_uri;
- 4Test thoroughly — not all older HTTP clients support 308
- 5Verify with curl -X POST -d 'test' -v to confirm method preservation
Tags
http308permanent-redirectmethod-preservingapi-migration
More in 3xx Redirection
http-300-multiple-choicesHTTP 300 Multiple Choices — What It Means & How to Fix It
Warninghttp-301-moved-permanentlyHTTP 301 Moved Permanently — What It Means & How to Fix It
Warninghttp-302-foundHTTP 302 Found — What It Means & How to Fix It
Warninghttp-303-see-otherHTTP 303 See Other — What It Means & How to Fix It
Warninghttp-304-not-modifiedHTTP 304 Not Modified — What It Means & How to Fix It
Warninghttp-305-use-proxyHTTP 305 Use Proxy — What It Means & How to Fix It
WarningFrequently Asked Questions
Use 308 when non-GET methods must be preserved (API endpoints). Use 301 for simple page redirects where GET is sufficient.