Permanent Redirect
3xx Redirection
Last updated:
Like 301 but explicitly preserves the request method.
Description
The method-preserving counterpart of 301. Search engines treat it equivalently to 301 for link equity, and clients preserve the original method (POST/PUT/DELETE) at the new URL.
When to use
Use 308 for permanent redirects of non-GET endpoints.
Specification
RFC 7538
Examples
HTTP/1.1 308 Permanent Redirect Content-Type: application/json Location: /new-url
res.status(308).redirect("/new-url");w.WriteHeader(http.StatusPermanentRedirect)
return jsonify({"error": "Permanent Redirect"}), 308Debug 308 with these tools
Related status codes
Moved Permanently
The resource has been permanently moved to a new URL. Clients and search engines should update their references.
Found
The resource is temporarily at a different URL. The client should continue to use the original URL for future requests.
See Other
The response to the request can be found under a different URL, and the client should perform a GET to that URL.
Temporary Redirect
Like 302 but explicitly preserves the request method (POST stays POST, etc.).
OK
The request succeeded. The response body contains the requested representation.
Not Found
The server has not found anything matching the requested URL.
Gone
The resource is no longer available and has been permanently removed.