Websites often change addresses and will need a way to tell visitors that a vital change has been made. While some websites would merely put a link to their new domain, the more professional approach is to utilize what is called a 301 redirect.
In essence, a 301 redirect will instantly direct a website visitor to another domain. For instance,
- A company changes their name from WidgetSeller to SellerofWidgets.
- A 301 redirect is put into place in WidgetSeller to divert all visitors to their new site, SellerofWidgets.
- When a user goes to WidgetSeller, the server automatically sends the user to the new domain.
This is done to tell users and search engines that a website is still available, but it is now located at a new address.
Breaking Down a 301
301 redirects indicate that a website has permanently moved. There are other redirects that are used for a temporary change. With a 301, search engines are aware of the change as well. What does this mean? This means that all of the search engine optimization that is in place with the original domain is now transferred to your new domain.
Oftentimes, this may take a few days to work itself out in the search results, but it does suffice when a website would still like to retain its current search engine rankings.
Redirecting does not need to occur on an entire domain. In fact, it can be done on specific files and folders. First, let’s look at how we perform a redirect using the .htaccess file.
- Create a file named “.htaccess” within your root directory.
- If the file exists, merely edit the current file in place.
- Now, within the file, we can tell it to redirect a page or an entire site to a new location.
- New Site: For an entire website to be redirected, we would put: Redirect 301 / http://www.newwebsitename.com
- New Folder or File Location: For a new folder to be redirected, we would put: Redirect 301 /olddirectory/ http://www.newwebsitename.com/newdirectory/
There are also other various ways to perform a redirect of this type depending on your webserver as well as the utilized programming languages.
A 301 redirect is an easy and more professional manner in which a website user or search engines can be notified of a direct change in your website’s structure or URL. When used correctly, prior search engine optimization links and rankings should be retained.