Forum Moderators: open
Just to be clear: The 301 redirects must remain in place until all the old backlinks have been changed to point to the new domain. In other words, a temporarily-installed 301 redirect results in a temporary backlink and pr transfer; If the 301 is removed and the search engines once again find an old link, they will follow it and re-index the old domain if the 301 has been removed.
The point that needs emphasis is that the search engines won't "remember" that a 301 used to be in place. So, using it to transfer pr and backlinks should be seen as a temporary fix to be used while the old backlinks are updated. Practically speaking, you cannot abandon an old domain until all the important backlinks have been updated to point to the new domain. This can take a long time, sometimes several years, before you get all your backlinks updated. But if you continue to attract new backlinks, after a while the old un-updated ones may not seem so important any more.
If you have a "real" domain name for the old domain, you can point the old domain to your new server, detect the old domain name being requested, and do the redirect to the new domain. Since this function resides entirely on on the new host, you can leave the redirect in place "forever." This doesn't work if your old domain is one of those "free hosting" accounts, because you don't own the domain, and therefor can't change the DNS to point to your new host. This is the main reason that using a free host's domain name for any serious purpose is a mistake; It's a trap.
Jim
Redirect permanent / [domain.com...]
or
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.domain\.com [NC]
RewriteRule ^(.*) [domain.com...] [L,R=301]
Thanks.
Yes, think of the 301 as a "forwarding address", and not as a "one-time change-of-address notice."
> And by the way, what is the best way to do 301 redirect:
You can use either method if the old domain and new domain are hosted separately. If both domains resolve to the same host, you'll have to use the mod_rewrite method to avoid the "infinite loop" that would result from redirecting both domains to the new domain. As shown in your code samples, mod_rewrite can test the requested domain and redirect conditionally, while mod_alias cannot.
Jim
Therefore, when you move your site, my advice would be to proceed this way:
1- place 301's at the old domain to have Google transfer PR to the new domain. But Yahoo will probably keep the old URLs indexed, and will not index the new URLs
2- Therefore, while google is transfering PR, you should ask the sites that link to yours to change their links
3- When this is done, then remove the 301's from the old domain. This will be the only way to have your new domain in Yahoo's index