308 Permanent Redirect means: A permanent redirect that preserves the method and body, combining 301's permanence with 307's method safety. Clients should update references to the new URI and repeat the exact same request there. Redirection 3xx codes tell the client the resource lives elsewhere, or that a cached copy is still valid. The family splits along two axes: permanent versus temporary, and method-preserving versus method-rewriting. Picking the wrong member causes duplicate submissions, lost POST bodies or stale SEO signals. In practice you will meet 308 when a permanent api migration where post endpoints must keep working; a domain change for an application that cannot tolerate post-to-get rewrites; an infrastructure move that must be both permanent and method-faithful. On the client side, follow with the same method and body, then permanently update stored URLs to the target. On the server side, use 308 instead of 301 whenever clients POST to the moved resource; keep the response cacheable like 301.
When 308 happens
- A permanent API migration where POST endpoints must keep working
- A domain change for an application that cannot tolerate POST-to-GET rewrites
- An infrastructure move that must be both permanent and method-faithful
How to fix it
On the client
Follow with the same method and body, then permanently update stored URLs to the target.
On the server
Use 308 instead of 301 whenever clients POST to the moved resource; keep the response cacheable like 301.
Should you retry?
Follow the redirect (or reuse the cache for 304); update references if permanent.
Debugging steps
When 308 appears unexpectedly, start by capturing the full exchange: 'curl -i' or the browser DevTools Network tab shows the exact status line and response headers, which often carry the real explanation. Inspect the Location header and count redirect hops: chains and loops are the usual culprits, and DevTools shows whether the browser rewrote your method on the way. For this code specifically, check whether the most common trigger applies to your situation: a permanent api migration where post endpoints must keep working. Compare your exchange against the raw HTTP example above. If you operate the server, correlate the timestamp with application and proxy logs using the request id; if you are the client, verify the request shape against the API documentation before changing anything or retrying.
Notes & gotchas
308 gives you 301's SEO permanence without 301's historic POST-to-GET rewrite; it is the correct permanent redirect for any endpoint that receives request bodies.
Examples
HTTP/1.1 308 Permanent Redirect
Location: https://api.example.com/v2/resource
curl -i https://api.example.com/v1/resource # observe the 308 response and its headers const res = await fetch("https://api.example.com/v1/resource");
// 308 Permanent Redirect: fetch follows redirects automatically.
// Use redirect: "manual" only when you must inspect Location yourself;
// browsers rewrite POST->GET on 301/302 but preserve it on 307/308. import requests
res = requests.get("https://api.example.com/v1/resource", timeout=10)
# 308 Permanent Redirect: requests follows redirects by default.
# allow_redirects=False to inspect Location; note requests preserves
# the method on 307/308 but rewrites POST->GET on 301/302 like browsers. Frequently asked questions
When is 308 better than 301?
Whenever the moved endpoint receives non-GET requests. 301's historic POST-to-GET rewrite can silently drop request bodies; 308 forbids that.
Do search engines treat 308 like 301?
Yes, major engines treat 308 as a permanent redirect and consolidate signals to the target, same as 301.
Which redirect code should I use?
Permanent move: 301 (GET) or 308 (method-preserving). Temporary: 302 (GET) or 307 (method-preserving). After a POST that should not repeat on refresh: 303. Cache revalidation is 304, not a redirect.
Do redirects hurt SEO or performance?
Single-hop permanent redirects (301/308) pass link equity and are fine. Chains, loops and temporary redirects for permanent moves waste crawl budget, add latency and dilute signals.
Try the JSON Validator
Check JSON syntax and locate errors by line and column.