对于一个网站的多个域:别名或重定向? [英] Multiple domains for one site: alias or redirect?

查看:117
本文介绍了对于一个网站的多个域:别名或重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在设立多家网站,其中许多人有多个域。现在的问题是:我别名的站点(与 ServerAlias​​ )还是我重定向的要求?

I'm setting up a number sites right now and many of them have multiple domains. The question is: do I alias the domain (with ServerAlias) or do I Redirect the request?

显然ServerAlias​​更好/更容易从可读性或脚本的观点。不过我听说,谷歌喜欢如果一切重定向到一个域的更好。这是真的?如果是的话,应该使用什么重定向code?

Obviously ServerAlias is better/easier from a readability or scripting perspective. I have heard however that Google likes it better if everything redirects to one domain. Is this true? If so, what redirect code should be used?

通用虚拟主机的例子将有:

Common vhost examples will have:

ServerName example.net
ServerAlias www.example.net

这是错误的,应该万维网也是除了重定向到example2.net和www.example2.net?或者是谷歌足够聪明,所有这些网站(或至少是WWW)是相同的网站?

Is this wrong and should the www also be a redirect in addition to example2.net and www.example2.net? Or is Google smart enough to that all these sites (or at least the www) are the same site?

更新:推理为希望别名的部分原因是,他们是要快得多。一种,只是因为他们没有(或没有)使用www显著增加初始页面加载。

UPDATE: Part of the reasoning for wanting aliases is that they are much faster. A redirect for a dialup user just because they did (or didn't) use the www adds significantly to initial page load.

更新,并回答:感谢保罗找到<一个href=\"http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html\">Google链接它教导我们要通过的不可以永存重复的内容刑罚的神话帮助管理员同行。但是请注意,这仅适用于内容在同一地点,举例在文章中以www.example.com/skates.asp?color=black&brand=riedell或www.example.com/skates.asp?brand= riedell&安培;颜色=黑色。事实上,文章明确表示不要创建多个网页,子,或大量重复内容的领域。

UPDATE and ANSWER: Thanks Paul for finding the Google link which instructs us to "help your fellow webmasters by not perpetuating the myth of duplicate content penalties". Note, however, this only applies to content ON THE SAME SITE, exemplified in the article with "www.example.com/skates.asp?color=black&brand=riedell or www.example.com/skates.asp?brand=riedell&color=black". In fact, the article explicitly says "Don't create multiple pages, subdomains, or domains with substantially duplicate content."

推荐答案

重定向比较好,那么总有一,为您的内容规范域。 <罢>我听到谷歌惩罚承载相同内容的多个领域,但我不能找到的时刻,一个源(编辑<一个href=\"http://www.searchenginejournal.com/duplicate-content-penalty-how-to-lose-google-ranking-fast/1886/\">here's一文,但是从2005年,也就是在互联网多年的古老的历史!)(不正确,请参见下面编辑)

Redirecting is better, then there is always one, canonical domain for your content. I hear Google penalises multiple domains hosting the same content, but I can't find a source for that at the moment (edit, here's one article, but from 2005, which is ancient history in Internet years!) (not correct, see edit below)

下面是一些mod-rewrite规则,重定向到一个规范域:

Here's some mod-rewrite rules to redirect to a canonical domain:

RewriteCond %{HTTP_HOST}   !^www\.foobar\.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://www.foobar.com/$1 [L,R=permanent]

这将检查主机不规范域(www.foobar.com),并检查该域实际上已经决定将请求重定向到规范域之前指定。

That checks that the host isn't the canonical domain (www.foobar.com) and checks that a domain has actually been specified, before deciding to redirect the request to the canonical domain.

进一步修改:<一href=\"http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html\">Here's直接从马口的文章 - 似乎这不是一样大,你可能会想一个问题。请仔细阅读这篇文章,因为它重复的内容区分在同一地点(如www.example.com/skates.asp?color=black&brand=riedell和www.example.com/skates.asp?brand=riedell& ;彩色=黑),并明确表示不要创建多个网页,子,或用大量重复内容的域

Further Edit: Here's an article straight from the horses mouth - seems it's not as big an issue as you might think. Please read this article CAREFULLY as it distinguishes between duplicate content on the same site (as in "www.example.com/skates.asp?color=black&brand=riedell and www.example.com/skates.asp?brand=riedell&color=black") and specifically says "Don't create multiple pages, subdomains, or domains with substantially duplicate content."

这篇关于对于一个网站的多个域:别名或重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆