308 Permanent Redirect

Redirect - Permanent, preserves HTTP method

HTTP 308 Permanent Redirect

What It Means

The HTTP 308 Permanent Redirect indicates that the resource has permanently moved to a new URL. Like 301, it's permanent and passes SEO value. Unlike 301, it guarantees the HTTP method won't change.

308 vs 301

Aspect 301 308
Permanence Permanent Permanent
SEO value transfer Yes Yes
Method preservation May change POST→GET Guaranteed preserved
Browser support Universal Modern browsers

When to Use 308

  • API endpoint migration: Permanently moving API endpoints that receive POST/PUT/DELETE
  • Domain migration with APIs: Moving api.old.com to api.new.com
  • URL restructuring: When APIs with non-GET methods need permanent redirects

Example Response

POST /api/v1/users HTTP/1.1
Host: old-api.example.com
Content-Type: application/json

{"name": "John"}

---

HTTP/1.1 308 Permanent Redirect
Location: https://api.example.com/v2/users

(Client re-sends POST with same body to new URL)

Complete Redirect Matrix

Code Permanent Method Use Case
301 Yes May change GET/HEAD redirects, SEO
302 No May change Temporary, GET/HEAD
307 No Preserved Temporary POST/PUT
308 Yes Preserved Permanent POST/PUT

Implementation

Nginx

location /api/v1/ {
    return 308 https://api.example.com/v2$request_uri;
}

Express.js

app.all('/api/v1/*', (req, res) => {
  const newUrl = req.url.replace('/v1/', '/v2/');
  res.redirect(308, `https://api.example.com${newUrl}`);
});

Browser Support

308 is supported in all modern browsers (Chrome, Firefox, Safari, Edge). For very old browsers, consider using 307 for temporary redirects or handling POST separately from GET.

Frequently Asked Questions

What does HTTP 308 Permanent Redirect mean?
HTTP 308 Permanent Redirect indicates that the resource has permanently moved to a new URL. Like 301, it tells search engines and clients to update their references. Unlike 301, it guarantees that the HTTP method (POST, PUT, DELETE) will not change when following the redirect.
What is the difference between 308 and 301?
Both are permanent redirects that pass SEO value, but they differ in method preservation. With 301, browsers may change a POST request to GET when following the redirect. With 308, the browser must preserve the original HTTP method and request body. Use 308 for API endpoints that receive POST/PUT/DELETE requests.
Does 308 pass SEO link equity like 301?
Yes. HTTP 308 is a permanent redirect and passes link equity (PageRank) to the new URL, just like 301. Search engines treat both as signals that the content has permanently moved and should update their index accordingly.
Is 308 supported by all browsers?
HTTP 308 is supported by all modern browsers including Chrome, Firefox, Safari, and Edge. Very old browsers may not support it, but this is rarely a concern for modern web applications. For legacy browser support, consider using 301 for GET requests and handling POST redirects separately.
When should I use 308 instead of 307?
Use 308 when the redirect is permanent and you want clients to update their bookmarks and search engines to update their index. Use 307 when the redirect is temporary and the original URL should still be used in the future. Both preserve the HTTP method.

Monitor your API redirects

Ensure your permanent redirects are working correctly.

Start monitoring free →

Related Status Codes

More Resources