devkult_
tools29converters34

308 Permanent Redirect

3xx redirection

The resource moved permanently, and clients must repeat the same method and body at the new URL.

308 is the permanent counterpart to 307: the resource has a new home, search engines should index the new URL, and clients must not change the request method. Next.js uses it for permanent: true redirects, and it's the right choice when moving API endpoints that accept POST or PUT.

Class3xx Redirection
Retry?Not applicable
Cacheable by defaultYes (heuristically, per RFC 9110)
Response bodyAllowed
Defined inRFC 9110 §15.4.9 — 308 Permanent Redirect
Example response
HTTP/1.1 308 Permanent Redirect
Location: https://www.example.com/docs

When you'll see it

  • Permanent redirects in Next.js (permanent: true) and on Vercel.
  • Moved API endpoints.
  • Trailing-slash normalisation in many frameworks.

How to use it well

  1. Treat it like a 301 for SEO — Google consolidates signals to the target URL.
  2. Very old clients (Internet Explorer on Windows 7 and earlier) don't understand 308; use 301 if you must support them.

Useful here: 301 vs 302 vs 307 vs 308 · HTTP Status Checker · Fixing ERR_TOO_MANY_REDIRECTS

Send a 308 from your server

Express
res.redirect(308, "https://www.example.com/docs");
Next.js route handler
return NextResponse.redirect(new URL("https://www.example.com/docs", request.url), 308);
Flask
return redirect("https://www.example.com/docs", code=308)
Go net/http
http.Redirect(w, r, "https://www.example.com/docs", http.StatusPermanentRedirect)
nginx
return 308 https://www.example.com/docs;

Check what a URL returns

Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.

curl -sI https://example.com/your-path | head -n 1

Frequently asked questions

301 or 308 for SEO?

Google treats them the same. Choose 308 when the method must be preserved (APIs), and 301 when it doesn't matter.

Headers used with 308
Related status codes