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