Clearly ServerAlias is much betterOrsimpler from the readability or scripting perspective. I've heard however that Google wants it better if everything redirects to 1 domain. Is true? If that's the case, what redirect code ought to be used?
Common vhost good examples may have:
ServerName example.internet ServerAlias world wide web.example.internet
Is wrong and really should the world wide web be also a redirect additionally to example2.internet and world wide web.example2.internet? Or perhaps is Google wise enough to that particular each one of these sites (or at best the world wide web) are identical site?
UPDATE: Area of the reasoning for wanting aliases is they tend to be faster. A redirect for any dialup user simply because they did (or did not) make use of the world wide web adds considerably to initial page load.
UPDATE and ANSWER: Thanks Paul for locating the Google link which instructs us to "help other website owners by not perpetuating the myth of duplicate content penalties". Note, however, this only is applicable to content On A Single SITE, summarized within the article with "world wide web.example.com/skates.asp?color=black&brand=riedell or world wide web.example.com/skates.asp?brand=riedell&color=black". Actually, the content clearly states "Don't create multiple pages, subdomains, or domain names with substantially duplicate content."
Redirecting is much better, then there's always one, canonical domain for the content.
I hear Google penalises multiple domain names hosting exactly the same content, however i aren't able to find a resource for your right now (edit, here's one article, but from 2005, that is ancient history in Internet years!) (not correct, see edit below)
Here's some mod-rewrite rules to redirect to some canonical domain:
RewriteCond % !^www.foobar.com [NC] RewriteCond % !^$ RewriteRule ^/(.*) http://world wide web.foobar.com/$1 [L,R=permanent]
That inspections the host is not the canonical domain (world wide web.foobar.com) and inspections that the domain has really been specified, before determining to redirect the request towards the canonical domain.
Further Edit: Here's articles completely from the horses mouth - appears it is not as large an problem as you may think. Please look at this article CAREFULLY because it differentiates between duplicate content on a single site (as with "world wide web.example.com/skates.asp?color=black&brand=riedell and world wide web.example.com/skates.asp?brand=riedell&color=black") and particularly states "Don't create multiple pages, subdomains, or domain names with substantially duplicate content."
Server aliasing may cause issues with CGI session continuity: since snacks are affixed to the domain these were offered from, CGI scripts need to be carefully written to ensure that they understand the aliasing, or all links within and in to the site need to be relative, or both - it's harder to prevent niggly little hard-to-debug problems because of the browser serving you different snacks according to if the user last joined your website through title.tld or world wide web.title.tld.
If they're entirely different domains, you will need to redirect because otherwise snacks cannot be shared between your two. If your user logs to your website at example1.com, they will have to sign in again when they visit example2.com.
If they're just different subdomains (example.com versus world wide web.example.com) this will not matter.
SSL certificates may also be an problem (wild card certs mitigate this but they are more costly).
Nowadays I doubt it matters. If you notice both records in the search engines, you already know you are doing the work wrong.