308
Redirection
308 Permanent Redirect: Permanent Move with Method Preservation
✦ The Golden Answer: The 308 Permanent Redirect status code is a permanent redirect that guarantees the client will repeat the request using the same HTTP method and request body. This is the permanent counterpart to 307. Use 308 when a resource has been permanently moved and you must preserve the original method (e.g., for POST, PUT, DELETE). For GET requests, 301 is still acceptable, but 308 is more explicit.
When to Use 308
- Permanent API migration – when you move an API endpoint permanently and need to preserve POST/PUT/DELETE methods.
- Domain migration with forms – when moving to a new domain and you have forms that submit data.
- URL structure changes – when you permanently change the URL structure and need to keep the method and body.
- HTTPS migration – while 301 is common for HTTP→HTTPS, 308 can also be used for POST requests to ensure the body is preserved.
Example: POST with Permanent Redirect
| Step | Direction | HTTP Message |
|---|---|---|
| 1 | Client → Server | POST /api/users HTTP/1.1 |
| 2 | Server → Client | HTTP/1.1 308 Permanent Redirect |
| 3 | Client → Server (auto) | POST /api/users HTTP/1.1 |
Comparison with 301
| Characteristic | 301 Moved Permanently | 308 Permanent Redirect |
|---|---|---|
| Permanent | ✅ Yes | ✅ Yes |
| Method Preservation | POST → GET (may change) | ✅ Preserved (POST → POST) |
| Body Preservation | ❌ Body may be dropped | ✅ Body preserved |
| SEO Link Equity Transfer | ✅ Yes | ✅ Yes |
| Best For | GET requests, static pages | POST, PUT, DELETE, API calls |
SEO Implications
- Link equity transfer – like 301, 308 passes PageRank and ranking signals to the new URL.
- Permanent – search engines will update their indexes and replace the old URL with the new one.
- Update sitemap – after setting up 308s, update your XML sitemap to reflect the new URLs.
- Avoid chains – multiple 308 redirects in a chain dilute link equity, so prefer direct redirects.
Implementing a 308 Redirect
Apache (.htaccess):
Redirect 308 /old-page https://example.com/new-page
Nginx:
location /old-page {
return 308 https://example.com/new-page;
}
return 308 https://example.com/new-page;
}
Cloudflare (Page Rules):
Forwarding URL (308) → https://example.com/new-page
When Not to Use 308
- For temporary moves – use 307.
- When you want to force GET – use 303 or 302.
- When you don't need method preservation – 301 is simpler and more widely understood.
Frequently Asked Questions
Is 308 better than 301 for SEO?
For GET requests, 301 and 308 are equivalent in terms of SEO. For POST requests, 308 is better because it preserves the method. However, search engines rarely crawl POST requests, so the difference is often negligible for SEO.
Can I use 308 for HTTP to HTTPS redirect?
Yes, but 301 is more commonly used and understood. If you have forms that submit over HTTP, 308 will preserve the POST data, which can be useful. However, most browsers handle 301 to HTTPS correctly.
What's the difference between 308 and 301?
Both are permanent redirects. The key difference is method preservation: 301 may change POST to GET, while 308 guarantees that the method and body remain unchanged. Use 301 for GET, 308 for POST/PUT/DELETE.