大网数据广告活动
网站运营与故障问答

Hreflang for regions (like states and provinces) within a country

· 52CE 我爱测

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://ww…

问题原文

原帖链接 · 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).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2018-07-04)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。