Site name in Google search results for multi-language websites

对着背影说爱祢 提交于 2019-12-12 22:13:17

问题


Using Schema.org, I can set the name for my website so it’s visible in Google Search: https://developers.google.com/structured-data/site-name

Example:

<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>

What if I have multi-language website? 5 languages → 5 index pages, e.g.: http://www.example.com/en/

Is it right to set different URLs for each language with different website names? I cannot find any documentation about that.


回答1:


Whether you use different paths (…/en/ + …/de/), different subdomains (en.example.com + de.example.com) or different domains (example.com + example.net), you have different (albeit translated) websites.

So use a separate WebSite item for each of your sites.

Example (using RDFa)

On http://example.com/en/, you could specify:

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

And on http://example.com/de/, you could specify:

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


来源:https://stackoverflow.com/questions/30461362/site-name-in-google-search-results-for-multi-language-websites

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!