By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

HTTP 301 Moved Permanently

Reference on the HTTP 301 status code, and how to use it with server-sided scripting.

Edited: 2013-07-05 12:08

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 301 Moved Permanently

See also

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