What Is a 308 Permanent Redirect? A 308 permanent redirect is an HTTP status code. It tells browsers and search engines that a URL has moved permanently. Unlike a 301 redirect, a 308 redirect ensures the request method (GET, POST, etc.) stays the same.
This makes it useful for form submissions and sensitive data transfers.
How Does a 308 Redirect Work?
When a server sends a 308 status code, it means:
- The old URL is no longer in use.
- The new URL is the permanent replacement.
- Search engines should update their indexes.
Example:
If example.com/old
redirects to example.com/new
with a 308, future requests will go directly to the new URL.
308 vs. 301 Redirect: Key Differences
Both 308 and 301 are permanent redirects. But they behave differently:
Feature | 308 Permanent Redirect | 301 Moved Permanently |
---|---|---|
Request Method | Keeps original (POST stays POST) | May change (POST to GET) |
Caching | Strong caching by browsers | May not cache as strictly |
Use Case | Forms, sensitive data | General page moves |
Key Takeaway: Use 308 when keeping the request method matters. Use 301 for standard page redirects.
When Should You Use a 308 Redirect?
A 308 permanent redirect is best for:
- Form submissions – Prevents data loss.
- Secure pages – Ensures POST requests stay secure.
- API endpoints – Maintains correct HTTP methods.
Avoid using 308 for temporary moves. Use 302 or 307 instead.
How to Implement a 308 Redirect
You can set up a 308 redirect in different ways:
1. Using .htaccess (Apache Servers)
Add this code to your .htaccess
file:
Redirect 308 /old-page https://www.example.com/new-page
2. Via Nginx Configuration
Add this to your server block:
location /old-page {
return 308 https://www.example.com/new-page;
}
3. Using PHP
Add this to your PHP script:
header("HTTP/1.1 308 Permanent Redirect");
header("Location: https://www.example.com/new-page");
exit();
SEO Impact of a 308 Redirect
- Preserves link equity – Like a 301, it passes SEO value.
- Better than 301 for forms – Prevents data method changes.
- Faster indexing – Search engines recognize permanent moves quickly.
Pro Tip: Always test redirects with tools like Redirect Checker or Google Search Console.
Common Mistakes with 308 Redirects
- Using 308 for temporary moves – Use 307 instead.
- Broken chains – Avoid multiple redirects in a row.
- Ignoring caching – Browsers cache 308 strongly. Clear cache when testing.
Conclusion
A 308 permanent redirect is a powerful tool. It keeps request methods intact, making it ideal for forms and secure pages. Unlike a 301, it ensures no data loss during transfers.
Remember:
- Use 308 for permanent moves with sensitive data.
- Use 301 for standard page redirects.
- Always test before going live.
By using 308 redirects correctly, you improve SEO and user experience. Implement them wisely!