301 Moved Permanently

Estimated reading: 2 minutes 662 views

This HTTP redirect response occurs when the resources of a URL have been removed or relocated.

This response redirects the browser to the new URL as defined by the website admin. Also,  location header information provides details for search engines to update their links to the new resource URL.

In some cases, the user-client may not have the appropriate method to redirect with this response.

If a user is seeing this response code and is unable to be redirected to the new URL, please contact the server support to find the needed information.

The HyperText Transfer Protocol (HTTP) 301 Moved Permanently redirect status response code indicates that the requested resource has been definitively moved to the URL given by the Location headers. A browser redirects to the new URL and search engines update their links to the resource.

Note: Although the specification requires the method and the body to remain unchanged when the redirection is performed, not all user-agents meet this requirement. Use the 301 code only as a response for GET or HEAD methods and use the 308 Permanent Redirect for POST methods instead, as the method change is explicitly prohibited with this status.

Status

301 Moved Permanently

Example

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

Specifications

Specification
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
# status.301