changing domain names, how to funnel traffic

SethTheUBotGuy

Creator of UBot Studio
Jun 15, 2009
116
4
0
ubotstudio.com
so I'm changing the domain name of my website, and I'm trying to figure out the best way to get the traffic from my current domain to go to my new domain. should I set up a 301?

my main concern is that I already rank for some useful keywords on the old site, but my new site may not be optimized for the same words. so how can I get the old site's traffic to come to my new site without forfeiting my google rankings?
 


Yes.. definitely 301 your old site over to your new one. If you 301 ALL of your old sites pages to your new domain, then you will lose some link juice. Ex: oldsite.com/blah_blah/ is now redirecting to newsite.com. If it is a mirror situation where the pages are copied (which I recommend, even if your new site has more pages than the old one), then you shouldn't lose much in the SE's. On your old domain, have an .htaccess rewrite to push everything to index.php

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
now for index.php on the oldsite:

1st -Ξ- if the new site is NOT a mirror
[high=php]
<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.newsite.com" );
?>
[/high]
2nd -Ξ- if the new site IS a mirror
[high=php]
<?php
$uri = $_SERVER['REQUEST_URI'];
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.newsite.com$uri" );
?>
[/high]

Hope that helps ya. If you want to keep the SE rankings then I would mirror all of your old URI's on your site... or course maybe it is atfer mindight on a Frdiay and Im' getiting drunke durehhh..
 
wouldn't it be easier to do something like...

RewriteEngine On
RewriteRule (.*) http://newsite.com/$1 [R=301]