【发布时间】:2018-06-05 20:41:12
【问题描述】:
我最近为我的网站添加了德语支持,现在我想在搜索结果中向讲德语的访问者显示我的网站的德语版本,并向所有其他访问者显示英语版本。我已将此链接标签添加到我的默认页面 (https://example.com/):
桌面
<link rel="canonical" href="https://example.com/">
<link rel="alternate" media="only screen and (max-width:651px)" href="https://m.example.com/">
<link rel="alternate" href="https://example.com/" hreflang="x-default">
<link rel="alternate" href="https://example.com/?hl=de" hreflang="de">
移动
<link rel="canonical" href="https://example.com/">
<link rel="alternate" href="https://m.example.com/" hreflang="x-default">
<link rel="alternate" href="https://m.example.com/?hl=de" hreflang="de">
而这个hreflang标签用于德语版本(https://example.com/?hl=de):
桌面
<link rel="canonical" href="https://example.com/">
<link rel="alternate" media="only screen and (max-width:651px)" href="https://m.example.com/?hl=de">
<link rel="alternate" href="https://example.com/" hreflang="x-default">
<link rel="alternate" href="https://example.com/?hl=de" hreflang="de">
移动
<link rel="canonical" href="https://example.com/">
<link rel="alternate" href="https://m.example.com/" hreflang="x-default">
<link rel="alternate" href="https://m.example.com/?hl=de" hreflang="de">
但是我有一个问题。当我在 Google 上搜索 Youtube 时,它只返回德语版的 Youtube (https://www.youtube.com/?gl=DE&hl=de)。但是当我搜索我的网站时,谷歌将我的网站的英文版显示为默认值,将德文版显示为 sn-p。我的代码有什么问题?
【问题讨论】:
标签: html seo multilingual hreflang