301 may refer to any of the following:
- 301 is an HTTP status code for pages that have moved permanently. It is often used to redirect a client to a new server, or an updated location on the same server. This code is a great way to keep a search engine, and frequent visitors informed of where the new web page is located. In the example below, a 301 in the .htaccess file is redirecting users that visit “http://computerhope.com” to https://www.computerhope.com.
Domain redirect
#HTTP 301 redirect computerhope.com to www.computerhope.com Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^computerhope.com [nc] rewriterule ^(.*)$ https://www.computerhope.com/$1 [r=301,nc]
Single web page redirect
In the example below of a single page 301 redirect, we are directing “oldexample.htm” page to “newexample.htm.” The second example is redirecting an old page in a sub directory to a new directory.
Always include a slash at the end of the link to a website or website folder without a file. Otherwise, the link results in a 301 redirect. This same rule applies to directories. For example, when dealing with a directory, we suggest using something like https://www.computerhope.com/tips/ to help prevent a 301 redirect, as they require extra load time and may lower your web page’s ranking.
redirect 301 /oldexample.htm https://www.computerhope.com/newexample.htm redirect 301 /jargon/b/backslas.htm https://www.computerhope.com/jargon/b/backslash.htm
- If you are looking for information about the 301 area code, see the area code listing.
Related information
- How to transfer a user to a new web page automatically.
302, Error, HTTP, Redirect, SEO terms, Web design terms