如何使用默认语言页面构建hreflang标签

问题描述 投票:0回答:1

我网站上的每个页面都有多种翻译。示例:

  1. https://www.example.com/something
    (英语 - 默认)
  2. https://www.example.com/en/something
    (英文)
  3. https://www.example.com/es/something
    (西班牙语)

我正在尝试找出这些页面的正确 hreflang 标签。谷歌的例子似乎都没有解释当你有两个该语言的页面时如何处理它。其中之一就是规范的。

如果我这样做,ahrefs 会告诉我有一个错误,因为“en”有 2 页:

<link rel="alternate" hreflang="en" href="https://www.example.com/something" />
<link rel="alternate" hreflang="en" href="https://www.example.com/en/something" />
<link rel="alternate" hreflang="es" href="https://www.example.com/es/something" />

Google 实际上不鼓励使用规范标签和 hreflang 标签。 https://developers.google.com/search/blog/2011/12/new-markup-for-multilingual-content

正确的解决方案是简单地没有“/en”版本吗?

html seo multilingual google-search-console
1个回答
0
投票

您不需要 /en/something 页面,因为您已经拥有 hreflang="en" 的主要英文域名。如果没有实用程序,甚至设置规范标签,您将拥有两个相同的页面。 重要的是每种语言都有其正确的 hreflang。

© www.soinside.com 2019 - 2024. All rights reserved.