Tonight I redirected a new domain my brother-in-law purchased back to his main site. He and his wife are chiropractors in Ottawa (just setup, may 401 till it’s propogated!) and the new domain is a little shorter and easier to type in than their full domain name (PrestonFamilyChiropractic.ca).
So I thought I would take the time to talk about an important SEO tool…
The 301 Redirect
Generally speaking if you’re moving domains (and therefore changing post permalinks) or changing blog categories etc, you’re going to want to use a 301 redirect.
A 301 redirect tells the search engines that the page in question has PERMANENTLY moved. In most cases it’s the best and most Search Engine friendly method for redirecting web pages as it’ll go a long way towards preserving your hard earned search engine juice.
So, without further adieu:
The Top 10 Methods to Create a 301 Redirect
(Do I have to mention that you need to REPLACE www.the-new-url.com in the examples below with the actual domain name you want to redirect TO?)
response.setHeader( “Location”, “http://www.the-new-url.com/” );
response.setHeader( “Connection”, “close” );
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “location: http://www.the-new-url.com/” );
From internet services manager, right click on the file or folder you wish to redirect; Select the “redirection to a URL” radio button and enter the new url. Place a checkmark for “The exact url entered above” and “A permanent redirection for this resource”
<%@ Language=VBScript %>
Response.Status=”301 Moved Permanently”;
5. Ruby on Rails
headers["Status"] = “301 Moved Permanently”
private void Page_Load(object sender, System.EventArgs e)
Response.Status = “301 Moved Permanently”;
7. CGI PERL
$q = new CGI;
8. ColdFusion<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”http://www.the-new-url.com/”>
9. .htaccess *
RewriteRule (.*) http://www.the-new-url.com/$1 [R=301,L]
* Ensure Apache Mod-Rewrite moduled is enabled on your account
10. HTML *
<a href=`http://www.the-new-url.com/`>Click Here to Go to My Other Site</a>
* I don`t recommend the HTML method as it’s not REALLY a 301 redirect!
(photo above from flickr.com)