html - 多语言网站的 Google 搜索结果中的网站名称

标签 html seo schema.org google-rich-snippets

使用 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是否正确?我找不到任何相关文档。

最佳答案

是否使用不同的路径(…/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>

关于html - 多语言网站的 Google 搜索结果中的网站名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30461362/

相关文章:

html - 尝试实现标签垂直对齐的设计

html - 为什么这两个页面的列大小不同?

php - <head> 元素是否需要位于代码的最顶部才能达到 SEO 目的?

javascript - 向列表项添加 anchor 标记会使列表项消失?

php - 在 prestashop 中获取当前页面和 url

php - 如何将 noindex 元标记添加到错误报告页面。

html - 您是否将 Schema Microdata 元标记放在 html 正文中?

schema.org - mainEntityOfPage 架构的正确使用是什么

html - 在 <body> 中使用 HTML5+Microdata 的 &lt;meta&gt; 标签

php - 建立一个一周的日历/时间表