When you see this status
- Resource permanently relocated to a new URL
- API versioning with permanent migration
- Domain or path restructuring
- SEO-friendly URL updates
Common causes
- Server-side resource relocation
- Deprecated API endpoints
- URL normalization changes
- Domain consolidation
How to debug it
- Verify the Location header contains the correct new URI
- Check if client follows redirects automatically
- Inspect browser/network tab for redirect chain
- Test with curl -v to see headers
Return this code in your framework
Express (Node.js)
res.redirect(308, 'https://new.example.com/resource');
FastAPI (Python)
return RedirectResponse(url="https://new.example.com/resource", status_code=308)
NestJS
@Get() @Redirect('https://new.example.com/resource', 308) getRedirect() {}
Go (net/http)
http.Redirect(w, r, "https://new.example.com/resource", http.StatusPermanentRedirect)
About HTTP 308
HTTP status code 308 Permanent Redirect is part of the
3xx Redirection family. Resource permanently moved to a new URI; future requests must use the new URI. Understanding it is essential for
backend engineers, API designers, and anyone debugging integrations between services.
The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance:
what triggers them, how to debug them in production, and exactly how to return them from common
frameworks. Each code page is hand-curated and verified.