308 Permanent Redirect

All status codes
3xx · Redirectionretryable

308Permanent Redirect

Similar to 301, but explicitly keeps the same HTTP method for the redirection.

What this code obliges you to do

Retry

Safe to retry

Repeating the same request can succeed, so a client may back off and try again. Honour Retry-After when the response sends one.

Caching

Cacheable by default

RFC 9110 lists this code as heuristically cacheable, so a cache may store it even with no Cache-Control header. Send explicit headers if that is not what you want.

Response body

Body allowed

You may return a payload explaining the outcome — for an error, a machine-readable problem document is worth the effort.

Method

Method and body preserved

The client must repeat the original method and body against the new URL. This is the code to use when redirecting a POST.

Indexing

Target replaces the old URL

A permanent redirect tells search engines to move the URL and carry its ranking signals across. Use it for migrations you are not undoing.

When you see it

1
1

Permanent API endpoint moves

Effect on search

Passes link equity exactly like 301. Preferred for modern RESTful API URL structure changes.

How to send it

1
Go
http.Redirect(w, r, newURL, http.StatusPermanentRedirect)

Codes people confuse with this one

2
Class3xx
RetrySafe
CacheDefault
BodyAllowed