Forum Moderators: open

Message Too Old, No Replies

Site with domain alias- getting Google to use the main domain?

         

georgec

10:23 pm on Mar 31, 2004 (gmt 0)

10+ Year Member



Hi:
I have a site with a main domain and a domain alias like so:

-http://www.mydomain.com
-http://www.mydomain2.com (alias)

Google seems to constantly switch between listing the first and second domain for an important keyword I keep track of, even though mydomain2.com is a legacy domain that I no longer have reference to on my site (though there still exists some links to it on other sites).

Is it a good idea to use .htaccess and simply redirect all visitors (not just Google) to mydomain.com when the legacy domain is typed in? Something like this:

RewriteEngine On
RewriteCond %{HTTP_HOST}!www.mydomain.com
RewriteRule ^.*$ [%{SERVER_NAME}%{REQUEST_URI}...] [R]

Might Google consider this as "fishy"? If there's a better .htaccess to use for domain redirection, I'd appreciate that info as well.

Thanks,

MikeBeverley

4:31 pm on Apr 1, 2004 (gmt 0)

10+ Year Member



If you're not using the alias domain why not just use a 404 error code to redirect users and bots? 404's aren't 'fishy' and it shouldn't cause duplicate results in the search engines for your main page.

jtbell

6:34 pm on Apr 1, 2004 (gmt 0)

10+ Year Member



Is it a good idea to use .htaccess and simply redirect all visitors (not just Google) to mydomain.com when the legacy domain is typed in?

Yes.

One important modification to your code: in the RewriteRule, use [R=301] which produces a permanent redirect, not plain [R] which produces a temporary (302) redirect. This will cause Google to (eventually) credit the target page with any PR brought in by the original links.

georgec

7:20 am on Apr 4, 2004 (gmt 0)

10+ Year Member



Thanks jtbell. I'm going to post in the Apache Web Server to ask for more details on the technical aspects of this. Thanks!

atlrus

4:35 pm on Apr 4, 2004 (gmt 0)

10+ Year Member



why don't you just write robots.txt file for the second domain if you dont want Google to mess with it anymore?