og-url-match
它能做什么
这个技能检查页面的 og:url 和规范链接是否指向完全相同的干净地址。它面向希望分享数据准确、链接预览一致的网站所有者。
适用场景
- ✓你请智能体检查每个页面的社交分享标签和规范标签是否一致的时候。
- ✓你的分享数据似乎很少,怀疑分享被分散到不同网址版本的时候。
- ✓你更改了页面地址,需要同时更新规范标签和社交标签的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/og-url-match/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我确保页面上的 og:url 和规范标签完全一致吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会比较每个页面上 og:url 的值与规范链接。如果两者在协议、域名、路径或查询字符串上有差异,它会把 og:url 设为与规范地址一致,并去掉追踪参数。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
OG URL Match
When og:url doesn't match the canonical URL, social platforms track share counts separately for each URL variant—published share counts get split across multiple URLs and appear lower than they actually are.
Quick Reference
- og:url must exactly match the <link rel='canonical-url'> URL
- Use absolute HTTPS URLs for both og:url and canonical-url
- Mismatched URLs cause social platforms to aggregate share counts on the wrong URL
- og:url should be the clean canonical URL without tracking parameters
Check
Compare the og:url meta tag value with the <link rel='canonical'> href value. Both must be identical absolute HTTPS URLs. Flag any page where they differ, either in protocol, domain, path, or query string.
Fix
Set og:url to exactly the same absolute HTTPS URL as the canonical tag. Remove any UTM parameters, session IDs, or tracking tokens from og:url. If no canonical tag exists, add one and set og:url to match it.
Explain
Social platforms use og:url as the canonical identifier for aggregating share counts and comments. If og:url differs from the canonical tag, shares on the page URL and shares of the og:url accumulate separately, making your content appear less popular than it is and creating attribution confusion.
Code Review
Compare the value of <meta property='og:url' content='...'> with the value of <link rel='canonical' href='...'>. They must be identical character-for-character. Check for: different protocols (http vs https), www vs non-www mismatch, query string differences, trailing slash inconsistencies. Flag any page where the two values differ.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/seo/og-url-match
常见问题
这两个标签为什么需要一致?
社交平台把 og:url 当作分享数和评论的主要标识,两者不一致会把这些数据分开。
这些网址中应该包含追踪代码吗?
不应该。这个技能说,要从 og:url 中去掉 UTM 及类似的追踪参数。
如果页面没有规范标签怎么办?
这个技能说,应该添加一个规范标签,并把 og:url 设为与其一致。
详情
作者的原始描述
Use when auditing Open Graph tags or investigating why social share counts appear low. Applies to any page with both canonical-url and og:url tags.
热度
- GitHub 星标
- 75k
- 排名
- #2961
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。