HTTP 308 Permanent Redirect

A sealed request follows a fixed new route from the old server to the replacement

HTTP 308 Permanent Redirect says a resource has a new permanent URI. A client that automatically follows the redirect preserves the request method. The new address normally comes from Location.

Where 308 helps an API

A service that permanently moves a write endpoint can use 308 to preserve a PUT or POST during redirection. Clients and caches may remember the change, subject to HTTP caching rules. Test the new endpoint with the methods it actually supports before relying on the redirect.

Check the first response and the destination

Compare the public address in Location with your intended host and scheme. If the destination sends another redirect, read each hop and verify the final response. You can use the final URL for a custom TestMyProxies check on a hostname you control. For a temporary move with method preservation, see 307.

Verify a permanent move for both reads and writes

> PUT /v1/preferences/42 HTTP/1.1
< HTTP/1.1 308 Permanent Redirect
< Location: /v2/preferences/42
> PUT /v2/preferences/42 HTTP/1.1
< HTTP/1.1 204 No Content

This example shows a client preserving PUT across a permanent redirect. An endpoint that responds to GET in a quick browser check can still reject a redirected write. For a safe verification, use a non-production record and compare the original method and media type with what the destination actually receives.

Find a redirect that points back to the old address

Record every Location value until you reach a final status or see an address repeat. If a new route redirects back to the old one, check the redirect rules at both the application and the gateway. If the response only seems to persist in one browser, compare with a fresh profile and inspect intermediary caching. Once the final endpoint is confirmed, update clients that you control to call it directly.

RFC 9110.

All HTTP status codes · All proxy testing guides · Open the proxy tester