【问题标题】:proper use link hreflang正确使用链接hreflang
【发布时间】:2015-05-18 20:37:45
【问题描述】:

我使用下面的链接标签来表示多种语言,有两个问题

  1. 我应该在网址http://domain.com/?hl=enhttp://domain.com/?hl=es 中添加<link href="http://domain.com/" rel="canonical"> 吗?
  2. 我应该在http://domain.com/?hl=en<html lang='es'> 中添加<html lang='en'>http://domain.com/?hl=es 中吗?
<head>
  <!-- … -->
  <link href="http://domain.com/" hreflang="x-default" rel="alternate">
  <link href="http://domain.com/?hl=en" hreflang="en" rel="alternate">
  <link href="http://domain.com/?hl=es" hreflang="es" rel="alternate">
</head>

【问题讨论】:

    标签: html seo multiple-languages


    【解决方案1】:
    1. 我应该在 url 中添加 http://domain.com/?hl=enhttp://domain.com/?hl=es?

    两者都没有,您可以使用:

    <link href="http://domain.com/" rel="canonical"> in http://domain.com/
    <link href="http://domain.com/?hl=en" rel="canonical"> in http://domain.com/?hl=en
    <link href="http://domain.com/?hl=es" rel="canonical"> in http://domain.com/?hl=es
    
    1. 我应该在 url http://domain.com/?hl=en 中添加 还是 http://domain.com/?hl=es?

    你可以把它放在http://domain.com/?hl=en,但不能放在http://domain.com/?hl=es

    【讨论】:

    • 感谢您的回复。 1 我发现这个sites.google.com/site/webmasterhelpforum/en/… 似乎被告知不要将canonicalhreflang="en" 一起使用我不明白。如果我像你一样在多个链接标签中添加规范,那么规范似乎毫无意义?规范实际上是做什么的? 2 如果我在 url domain.com/?hl=en 中添加 &lt; html lang='en' &gt; 我应该在 url domain.com/?hl=es 中添加 &lt; html lang='es' &gt; 吗? &lt;html lang = '..'&gt; 到底是做什么的?
    • 不,这不是 Google 在您的链接中所说的。在我的回答中,我说你“可以”,而不是“应该”。如果可以使用不同的 URL 访问您的某些内容,则规范链接可帮助搜索引擎合并两个 URL。您可以将 lang='es' 放在西班牙语页面中。它告诉搜索引擎内容是西班牙语。
    • 我有这个问题是因为我在谷歌网站管理员工具en - no return tags es - no return tags 中收到错误消息所以我不确定是什么导致了这个错误消息?根据您的回答,如果我在两种不同的语言网址中添加&lt;link href="http://domain.com/" rel="canonical"&gt; 似乎没有错?
    • 是的。有关详细信息,请参见此处:seosummaries.com/expertise/…
    • 不,它与规范或语言属性无关。可能 Google 尚未重新处理您的页面或尚未更新 GWT 中的信息。如果问题仍然存在,您应该向 Google 的网站管理员论坛报告。
    猜你喜欢
    • 1970-01-01
    • 2017-08-04
    • 1970-01-01
    • 2013-10-26
    • 2019-04-22
    • 2015-03-06
    • 2021-09-29
    • 1970-01-01
    • 2023-03-26
    相关资源
    最近更新 更多