Share via:

HTTP 301 Moved Permanently

The HTTP 301 status code indicates that the content has been moved. Learn how to implement it in this tutorial.


Edited: 2019-11-23 06:33

The HTTP 301 Moved Permanently is sent by servers whenever a requested resource has been permanently moved. The 301 HTTP status code is normally sent together with a HTTP Location Header, containing the URL of the new location of the resource – unless the request was a HEAD, in which case the location can be omitted.

It is important to properly redirect your pages when they move, so that search engines will pass on the rank of the old pages to the new pages – if this is not possible, for whatever reason, you might want to use a meta tag redirect instead.

How the 301 Moved Permanently look

A GET request for a resource might look like the below:

GET /old-page.html HTTP/1.1

A server response containing a 301 response code, could look very much like the below example:

HTTP/1.1 301 Moved Permanently

See also

  1. PHP Redirect – How to perform redirects with PHP
  2. Meta Tag Redirect – How to do Client-sided Redirects.