问题原文
原帖链接 · Brad Thiessen · CC BY-SA 4.0
I'm working on a website which has different content depending on the province/state the user is from.
Is it valid to add the subdivision code to the hreflang like below?
<link rel="alternate" hreflang="en-ca-ab" href="https://www.example.com/ca/ab/example/"/>
If not, is there another way to let search engines know that the content is specific to a certain province/state?
已采纳解答
原帖链接 · GDVS · CC BY-SA 4.0
In short, no. The "Supported language/region codes" section of Google's hreflang guidelines is fairly unambiguous:
The value of the hreflang attribute identifies the language (in ISO 639-1 format) and optionally the region (in ISO 3166-1 Alpha 2 format) of an alternate URL.
The use of the word "region" there is perhaps confusing. ISO 3166-1 Alpha 2 codes denote countries1.
What you probably want to do is known as local SEO, which relies more on content and off-site optimisations to target search queries with local intent. It's beyond the scope of your question to cover that here.
1 To be really pedantic, even this is semantically troublesome. For instance, the constituent countries of the UK don't have their own codes, even though they are countries (not states or provinces).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
