HTTP 301

From Wikipedia, the free encyclopedia
  (Redirected from 301 Moved Permanently)
Jump to: navigation, search

The HTTP response status code 301 Moved Permanently is used for permanent URL redirection, meaning current links or records using the URL that the response is received for should be updated. The new URL should be provided in the Location field included with the response. RFC 2616 states that:

  • If a client has link-editing capabilities, it should update all references to the Request URL.
  • The response is cachable.
  • Unless the request method was HEAD, the entity should contain a small hypertext note with a hyperlink to the new URL(s).
  • If the 301 status code is received in response to a request of any type other than GET or HEAD, the client must ask the user before redirecting.

Example[edit]

Client request:

GET /index.php HTTP/1.1
Host: www.example.org

Server response:

HTTP/1.1 301 Moved Permanently
Location: http://www.example.org/index.asp

Search engines[edit]

Google recommends using a 301 redirect to change the URL of a page as it is shown in search engine results.[1]

See also[edit]

References[edit]