3

使用 Schema.org,我可以为我的网站设置名称,使其在 Google 搜索中可见:https ://developers.google.com/structured-data/site-name

例子:

<script type="application/ld+json">
    {  "@context" : "http://schema.org",
       "@type" : "WebSite",
       "name" : "Your WebSite Name",
       "alternateName" : "An alternative name for your WebSite",
       "url" : "http://www.your-site.com"
    }
    </script>

如果我有多语言网站怎么办?5 种语言 → 5 个索引页,例如:http://www.example.com/en/

用不同的网站名称为每种语言设置不同的 URL 是否正确?我找不到任何关于此的文档。

4

1 回答 1

4

无论您使用不同的路径 ( …/en/+ …/de/)、不同的子域 ( en.example.com+ de.example.com) 还是不同的域 ( example.com+ example.net),您都拥有不同的(尽管已翻译)网站。

因此,为您的每个站点使用单独的WebSite项目。

示例(使用 RDFa)

在 上http://example.com/en/,您可以指定:

<head typeof="schema:WebSite">
  <title property="schema:name">Example</title>
  <link property="schema:url" rel="canonical" href="http://example.com/en/" />
</head>

在 上http://example.com/de/,您可以指定:

<head typeof="schema:WebSite">
  <title property="schema:name">Beispiel</title>
  <link property="schema:url" rel="canonical" href="http://example.com/de/" />
</head>
于 2015-05-26T15:03:09.967 回答