How To Forward A Domain To A New Location
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
So, You’ve finally decided to bite the bullet and get an actual domain for that website or blog that you’ve been running on a subdomain since forever. The biggest problem you’ve got now is that all of a sudden those inbound links you’ve been working your arse off to get are going to stop working. Or maybe you’ll replace the old index.html with one that asks visitors to click on a link to get to the new location for the site.
What you need is to redirect the old url to the new one and you need to do it transparently so that the visitor does not have to be inconvenienced by having to click an extra link to get there. Much better to put a notification on the site about the new url in a prominent place and use the transparent redirect (as in the visitor to the page can’t see it or be slowed down by it) so that people’s bookmarks don’t stop working all of a sudden.
i.e. you need to arrange it so that any urls that point to oldsubdomain.olddomain.com will all be redirected to the new site at newdomain.com. Now I’ll say right off that the method I know is for sites hosted on Apache servers but then again, who’d want to run a serious site on a Microsoft server anyway?
So what you do is create a text file (use notepad or some other editor that will create a flat ASCII text file with no formatting codes) with the following commands in it.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^oldsubdomain.olddomain.com [NC] OR
RewriteCond %{HTTP_HOST} ^www.oldsubdomain.olddomain.com [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]
Replace the example domains with the one’s that you’re using and save the file.
Now get out your FTP utility and upload it to the directory where your old index.html used to be. Once it’s in place and the FTP connection is still open, rename the file to .htaccess (thats a dot, followed by htaccess)
*Note* If you already have a .htaccess file, add these commands to the beginning of it.
Now any url that points to “oldsubdomain.olddomain.com”, “www.oldsubdomain.olddomain.com”, or any of the pages within those domains will instantly be redirected to the equivalent page on http://newdomain.com. Search engines will see that the old url is returning a code “301″ which means moved permanently and they will use this information to update their indexes. The redirect will be instantaneous and completely transparent to the person loading your site.
This way, you’ve got time to contact all the sites linking to you and ask them to change the url they’re linked to while still being able to receive the traffic that they’re sending you. It also means that you don’t have to ask people to click on a link to get to the page since a lot of ‘em won’t bother.
I’ve used this exact method to move the blog “I Am Not A Hamster” from it’s old location at http://iamnotahamster.peculiarplace.com to it’s new domain http://iamnotahamster.net and not only do the main pages get redirected, so also do every one of the pages on the blog get url’s forwarded to their equivalent locations on the new domain.
*SEO Note* This method does not transfer page rank, that’s up to Google to compute it for the new location, it just makes sure that old links continue to work and get auto-forwarded instantly to their new locations. That in itself is invaluable to a site that’s being moved.
Technorati Tags: move website, change domain, instantaneous, transparent redirect, redirect visitors, forward link, redirect, apache
If you enjoyed this post, make sure you subscribe to my RSS feed!








