DEV Community

Cover image for Redirection status codes
Emilie Gervais
Emilie Gervais

Posted on • Edited on

Redirection status codes

Preface: A HTTP status code is issued from the server in response to a client's request made to the server. The five status code response classes are informational, successful, redirection, client error and server error.




Redirection status codes

Redirection status codes are returned when a new resource has been substituted for the requested resource. To complete the request, further action must be taken.

Table Of Contents


300 Multiple Choices

Definition: The request has more than one possible response. The user-agent or client should choose one of them. There is no standardized way of choosing one of the responses, but HTML links to the possibilities are recommended so the user can pick. For example, this code could be used to present multiple video format options, to list files with different filename extensions, or to suggest word-sense disambiguation.

300 Multiple Choices is defined in RFC 7231.


301 Moved Permanently

Definition: The request is looking for a resource that has moved permanently. Its new URL is given in the response.

301 Moved Permanently is defined in RFC 7231.


302 Found

Definition: The request is looking for a resource with a URI that has been changed temporarily. Further changes in the URI might be made in the future. The current URI should be used by the client in future requests.

302 Found is defined in RFC 7231.


303 See Other

Definition: The request is looking for a resource that can be found at another URI using a GET method. When received in response to a POST, PUT or DELETE, it should assumed that the server has received the data and the redirect should be issued with a separate GET message.

303 See Other is defined in RFC 7231.


304 Not Modified

Definition: The request is looking for resource that hasn't been modified since the last time the client accessed it, so the client can continue to use the same cached version of the response.

304 Not Modified is defined in RFC 7232.


305 Use Proxy

*
Definition:* The request is looking for a resource that must be accessed by a proxy. It has been deprecated due to security concerns regarding in-band configuration of a proxy.

305 Use Proxy is defined in RFC 7231.


306 (Unused)

Definition: This response code is no longer used; it is just reserved. It was used in a previous version of the HTTP/1.1 specification.

306 (Unused) is defined in RFC 7231.


307 Temporary Redirect

Definition: The request is looking for a resource that is currently redirected. The server sends this response to direct the client to get the requested resource at another URI with same method that was used in the prior request. Future requests can still use the original URI. 307 Temporary Redirect has the same semantics has the 302 Found response code, with the exception that the user agent must not change the HTTP method used: If a POST was used in the first request, a POST must be used in the second request.

307 Temporary Redirect is defined in RFC 7231.


308 Permanent Redirect

Definition: This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: If a POST was used in the first request, a POST must be used in the second request.

308 Permanent Redirect is defined in RFC 7538.




Unofficial and customized non-standard responses defined by server softwares are not included in the list above.

Resources:

Top comments (0)