Forum Moderators: phranque
The Situation...
The company has, in the past, purchased multiple domains for print ads and for general type-in traffic ie misspellings. Currently all of the additional domains are 'pointing' to the main site using Virtual Hosts and ServerAlias in the httpd conf file.
The Problem...
What is the best thing to do with these domains whilst preventing a google penalty for apparent duplicate content but still allowing people to find the site by typing in www.odmainname.com (misspelt but registered domain name)?
Options…
1. Keep using serveralias to point all other domain traffic to main domain. Is this OK with google?
2. Create separate sites for each domain with separate robots.txt files to prevent indexing and therefore not having duplicate content indexed by google. This would be a bit of a ball ache for maintenance?
3. Use permanent redirects in the httpd conf file to redirect all traffic to the main domain. Is this possible while using virtualhosts? I tried it but sent the server in to a loop.
4. Use mod_rewrite to pass different robots.txt files depending on what the domain is? Something like this…
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?(domain1¦domain2¦domainN)\.tld$
RewriteRule ^/robots.txt$ /robots.txt.other [L]
RewriteCond %{HTTP_HOST} ^(www\.)?(domain1¦domain2¦domainN)\.tld$
RewriteRule ^/(.*) [main-domain.tld...] [R=301,L]
And no I didn't do this.
5. Any more options/ideas/insights?
6. Give up, leave it as it is, start playing with layers, channels and masks again and hire a sys admin?
As always help will be appreciated and reciprocated with beer if in the Manchester part of the world.
have you never thought about making the other domains pointto the main domain, by using symlinks.
in your /www/domains (possibly - could be something differnt depending on your apache config), you can create as many symlinks to one folder as you like ie:
www.domain.com points to /usr/website
www.domian.com points to /usr/website
and so on...they all point to the folder of your website.
to create symliks, cd into /www/domains, then type:
ln -s /where/your/site/is www.domain1.com
and repeat this as many times as you like, just changing the www.domain1.com bit to all your other domains.
does this help
Regards,
william
Use (3) - permanent redirect is the correct way to do it.
Don't bother messing with robots.txt and mod_rewrite.
If www.secondarydomain.com/robots.txt returns 301 when there isn't really a file called robots.txt - that's not a problem.
I have many sites that work that way and none got banned on penalised.
This is a different situation than the one described in this thread Pointing multiple domain names to main site without mirrors [webmasterworld.com] where those other domains were not hosted on any webserver. That is why there was no place to put the RedirectPermanent directives for those other domains.
Andreas
I have had a look at the various threads that have been posted concerning multiple domains and the best way to do it.
I just thought that I'd ask for clarification before I went and did anything. The main site is getting some good results and I didn't want to screw up all the hard work by doing something I wasn't sure about.
I will try and do the permanent redirect. I'll check the photoshop manual to see how that is done properly.
Cheers