问题原文
原帖链接 · Matt The Ninja · CC BY-SA 4.0
My search results seem to not be correctly localized since adding a 'Europe' /eu/ page.
My header now looks like this (taken from EU page https://example.com/eu/features/).
<link rel="canonical" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="x-default" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-gb" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-us" href="https://example.com/us/features/">
<link rel="alternate" hreflang="en-au" href="https://example.com/au/features/">
<link rel="alternate" hreflang="en-ie" href="https://example.com/ie/features/">
<link rel="alternate" hreflang="en-fr" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-es" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-de" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-it" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-pt" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-nl" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-be" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-ch" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-at" href="https://example.com/eu/features/">
<link rel="alternate" hreflang="en-gr" href="https://example.com/eu/features/">
Anything incorrect with this implementation?
Much appreciated!
已采纳解答
原帖链接 · Patrick Mevzek · CC BY-SA 4.0
Most of your hreflang are unneeded, maybe because you are confusing languages and localizations.
See https://www.rfc-editor.org/rfc/rfc5646.html#section-2.2.4 :
Region subtags are used to indicate linguistic variations associated with or appropriate to a specific country, territory, or region. Typically, a region subtag is used to indicate variations such as regional dialects or usage, or region-specific spelling conventions.
As such, what sense do you have for en-fr, en-be, en-gr, etc.?
English, as spoken in France, Belgium or Greece, is still English. There is no specific dialect there, nor spelling conventions. You can debate if it is the en-us or en-gb variants, or if it is broken English or business English, but clearly en-fr and others are not needed...
Further, see section 4.1:
A subtag SHOULD only be used when it adds useful distinguishing
information to the tag. Extraneous subtags interfere with the
meaning, understanding, and processing of language tags.
The fact that most of your tags refer to only one URL, which is also the one for en-gb again shows that there are many unneeded values.
These values depict languages, potentially if dialects exist the way they are spoken in specific places on the map, but these values do not depict localization. So en-fr does not mean "the English page content for people living in France".
You can go to https://r12a.github.io/app-subtags/ to check valid language tags, but this is mostly a syntax check. If you put en-fr (or even en-gb in fact) you get this warning:
Check that the region subtag GB contributes information needed to distinguish this language tag from another one, otherwise leave it out.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
