308 Permanent Redirect

Repeat the same request at a new permanent URL.

When to use it

Like 301, but the method and body must not change.

Good to know

308 is the permanent version of 307: search engines treat it like 301 and transfer ranking signals, but the method and body must not change. Use it for API endpoints that receive POST, PUT or PATCH and have moved for good. Browsers cache it like 301, so the same caution applies: a wrong 308 can stick in users’ browsers for a long time.

Next.js answers with 308 for redirects marked permanent and for trailing-slash normalisation, which surprises people reading their logs. Very old clients, such as Internet Explorer 11 on Windows 7, don’t understand 308; if you still serve them, use 301 for plain GET pages. Like 301, a 308 is cacheable by default, so add Cache-Control: max-age while you are still testing a new redirect.

Redirection (3xx)

3xx codes are redirections: the client has to go somewhere else, or use its cached copy, to finish the request.

What it looks like

HTTP/1.1 308 Permanent Redirect

How to send it

Node.js / Expressres.redirect(308, '/new-url')
Python / Flaskreturn redirect('/new-url', code=308)
nginxreturn 308 https://example.com$request_uri;

How to check it

curl -s -o /dev/null -w "%{http_code}\n" https://example.com/

Open HTTP Status Codes