301 Redirect vs. Rel=Canonical

2019-05-31 15:53发布

问题:

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.