This question was asked a long ago, while the RFC 2616 was still hanging around. Some answers to this question are based in such document, which is no longer relevant nowadays. Quoting Mark Nottingham who, at the time of writing, co-chairs the IETF HTTP and QUIC Working Groups:
Don’t use RFC2616. Delete it from your hard drives, bookmarks, and burn (or responsibly recycle) any copies that are printed out.
The old RFC 2616 has been supplanted by the following documents that, together, define the HTTP/1.1 protocol:
So I aim to provide an answer based in the RFC 7231 which is the current reference for HTTP/1.1 status codes.
The status code
A response with is a common way of performing URL redirection. Along with the status code, the response should include a header with a different URI. Such header will be parsed by the user agent and then perform the redirection:
Web browsers may change from to in the subsequent request. If this behavior is undesired, the (Temporary Redirect) status code can be used instead.
This is how the status code is defined in the RFC 7231:
6.4.3. 302 Found
The (Found) status code indicates that the target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client ought to continue to use the effective request URI for future requests.
The server SHOULD generate a header field in the response containing a URI reference for the different URI. The user agent MAY use the field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the different URI(s).
Note: For historical reasons, a user agent MAY change the request method from to for the subsequent request. If this behavior is undesired, the (Temporary Redirect) status code can be used instead.
According to MDN web docs from Mozilla, a typical use case for is:
The Web page is temporarily not available for reasons that have not been unforeseen. That way, search engines don't update their links.
Other status codes for redirection
The RFC 7231 defines the following status codes for redirection:
- (Moved Permanently)
- (Temporary Redirect)
The RFC 7238 was created to define another status code for redirection:
Refer to this answer for further details.
- Why does a chameleon change its color
- What makes you completely useless in life
- Can air freshener make you sick
- Do psychopaths have anxiety or panic attacks
- Is Korea US FTA equitable
- Do you carry pepper spray
- Is Bittrex safe
- comments closed
- Who designed the NFL logo
- Is caste system overrated in India
- How does Pronamel toothpaste work
- Have you ever made homemade mayonnaise
- Can I deadlift with scoliosis
- What is RAC 56
- Are all the James Bond movies connected