301 Redirect vs. Rel=Canonical

隐身守侯 提交于 2019-12-23 04:24:49

问题


On our site, locale specific URLs are accessible across domains.

Say we have two URLs: dog.aspx (English) and hund.aspx (German).

The following URLs work:

  • www.example.com/hund.aspx (displays English content, not German,but URL is German)
  • www.example.de/hund.aspx (correct URL)

To solve this, we have two options:

  • www.example.com/hund.aspx redirect to www.example.com/dog.aspx

  • Have canonical URL in www.example.com/hund.aspx to www.example.com/dog.aspx

What is more preferable? 301 redirect or canonical URL?


回答1:


A 301 redirect is preferable to a canonical declaration.

User agents can’t bypass redirects, while canonical is only an advice which a) not all user agents support, and b) even user agents that support it don’t have to follow it.

RFC 6596 recommends this, too:

Before adding the canonical link relation, verification of the following is RECOMMENDED:

  1. […]

  2. For HTTP, permanent HTTP redirects (Section 10.3.2 of [RFC2616]), the traditional strong indicator that a IRI's content has been permanently moved, could not be implemented in place of the canonical link relation.

  3. […]




回答2:


The Cananical URL is only when the content is identical and to avoid any duplicate content penalties from google. Since the content is in a different language, this isn't identical so this isn't a issue.

It sounds like what you are after is the hreflang tag. You can read up more about how to implement it here

Basically you would use something like this:

<link rel="alternate" hreflang="de" href="www.abc.de/hund.aspx" />

<link rel="alternate" hreflang="en-us" href="www.abc.com/hund.aspx" />




回答3:


Use 301 redirect which passes more link juice than canonical. It's a duplicate content with different URL, redirect will solve it perfectly.




回答4:


I suggest using both 301 redirect and hreflang tag, it isn't a content issue as the same content is in a different language but a redirect would help. It is important to have a hreflang tag in place as the content is in German and English.



来源:https://stackoverflow.com/questions/13294948/301-redirect-vs-rel-canonical

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!