全面理解hreflang

Fully Understanding hreflang

我有一个网站目前以美元显示所有价格。如果您来自英国,我想将其更改为英镑;如果您来自法国或德国,我想将其更改为欧元。页面上的文字将始终以英文显示。

我探索了各种选项,大多数人说 Google 更喜欢您为每个变体提供不同的 url,而不是简单地根据用户 location/ip 地址呈现不同的内容。

因此,假设我在我的商店主页上,我会提供以下网址(显示适当的货币):

显然我不希望 Google 因重复内容而惩罚我。我一直在研究 hreflang 来解决这个问题,但还没有完全掌握它,因为很多示例都过于简化了。

比如说我在 www.example.com/shop。我会简单地在头部渲染以下内容吗?:

<link rel="alternate" href="http://www.example.com/uk/shop" hreflang="en-gb" />
<link rel="alternate" href="http://www.example.com/fr/shop" hreflang="fr-fr" />
<link rel="alternate" href="http://www.example.com/de/shop" hreflang="de-de" />
<link rel="alternate" href="http://www.example.com/shop" hreflang="x-default" />

现在如果我在 www.example.com/fr/shop 上,我是否需要像上面那样渲染?

其他问题:

我是否应该为 en-us 提供一个变体,即使它与默认变体相同?

此外,如果用户在 www.example.com/shop 上,并且我检测到该用户来自法国,我会直接将用户重定向到 www.example.com/fr/shop 吗?我的问题是法国人怎么能看到美元价格?我假设我可以存储一个 cookie 以确保这种重定向只在第一次发生。

我的最后一个问题是,即使文本仍然是英文并且内容只会有 price/currency 的差异,这样做是否有意义?

我知道有很多问题,但非常感谢您的澄清。谢谢

Obviously I don't want Google to penalise me for duplicate content.

Google 不会因重复内容而惩罚网站。

Say for example I am on www.example.com/shop. Would I simply render the following within the head?

是的。

Now if I was on www.example.com/fr/shop would I need to render the same as above?

是的。

Should I provide a variant for en-us even though it would be the same as the default?

没有

Also if the user was on www.example.com/shop and I detected the user was from France would I simply redirect the user to www.example.com/fr/shop? My trouble with this is how could someone in France see prices in dollars?

你应该。在您的页面上添加一个转换按钮。

My final question is does this make sense to do this even tough the text will still be in English and the content will only vary by price/currency?

不是,你应该也有翻译文本。