跳到正文
Skillpedia
SEO75k · #2869

hreflang

它能做什么

这项技能检查拥有多种语言或地区版本的网站,是否告诉了搜索引擎其页面之间的关系。适用于以多种语言发布内容的网站所有者。

适用场景

  • ✓当你的网站同一页面有英语、法语和其他语言版本的时候。
  • ✓当搜索结果向用户显示了错误的语言版本的时候。
  • ✓当你为现有网站添加新的语言或地区的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/hreflang/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/hreflang/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请添加正确的语言标签,使法语用户能看到法语页面。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查 hreflang 标签,确保每个语言版本都与其他版本相连,包括 x-default 备用项。它还会检查链接是否双向相连,并使用正确的语言代码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Add hreflang tags for multilingual sites

Without hreflang, users searching in French might see your English page—proper implementation ensures the right language version appears in search results for each region.

Quick Reference

  • hreflang tells search engines which language version to show users
  • Always include x-default for fallback/language selector pages
  • Must be reciprocal—all pages must link to all variations
  • Use ISO 639-1 language codes and ISO 3166-1 Alpha-2 regions

Check

Check if this multilingual website properly implements hreflang tags for language and regional targeting.

Fix

Add appropriate hreflang tags to indicate language and regional variations of this page.

Explain

Explain how hreflang tags help search engines serve the correct language version to users in different regions.

Code Review

Review metadata generation, rendered HTML, structured data, and response headers related to Add hreflang tags for multilingual sites. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/i18n/hreflang

常见问题

什么是 x-default?

它是适用于任何访客的页面的备用标签,例如语言选择页面。

链接为什么必须双向?

这项技能指出,每个版本都必须链接到所有其他版本,否则搜索引擎可能会忽略这些标签。

使用哪些代码?

这项技能使用 ISO 639-1 语言代码和 ISO 3166-1 Alpha-2 地区代码。

详情

作者的原始描述

Use when auditing metadata, crawlability, structured data, or indexability related to Add hreflang tags for multilingual sites. Verify the rendered HTML and HTTP response rather than relying only on source files.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2869
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能