3xx Redirects

300 Multiple Choices

This code informs users and user agents that the resource is available at multiple locations, perhaps in different representations.

301 Moved Permanently

This code redirects clients to a new location for the requested resource. This happens often when people relocate files on their servers or when content is moved from one server to another. Because the redirection is permanent, clients and caches can remember the new location and automatically redirect future requests.

302 Moved Temporarily

This code is a temporary redirect to a new location. Apparently, many user agents always issue GET requests for the new URI, regardless of the original request method. This action violates even the older HTTP RFCs (1945 and 2068) but has become the expected behavior. RFC 2616 added two new status codes, 303 and 307, to “fix” this problem.

303 See Other

This code is the same as 302, except that the client should make a GET request for the new URI, regardless of the original request method.

304 Not Modified

This code is used when the client makes a conditional GET request (e.g., If-modified-since) and the resource has not changed.

305 Use Proxy

This code allows origin servers to redirect requests through a caching proxy. The proxy’s address is given in the Location header.

306 (Unused)

A search of the HTTP working group archives reveals that, at one time, this code was named Switch Proxy.

307 Temporary Redirect

This code is similar to 302, indicating a temporary ...

Get Web Caching now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.