跳到正文
Skillpedia
SEO75k · #2767

canonical-url

它能做什么

这项技能检查每个页面是否为自己声明了唯一的首选地址。适合页面可以通过多个地址访问的网站所有者,例如使用了网址参数的情况。

适用场景

  • ✓当页面可以通过网址参数、www 与非 www 版本,或分页列表访问时。
  • ✓当页面没有 canonical 标签时。
  • ✓当你希望每个页面都指向自己的首选地址时。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请确保我商店中的每个商品页面都有指向其简洁地址的 canonical 标签。”

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

工作原理

智能体会在页面的 head 中添加或修正 canonical 标签,并使用包含协议和域名的完整网址。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Set canonical URLs for all pages

Duplicate content from URL parameters, www vs non-www, or pagination dilutes ranking signals—canonical tags consolidate these signals to the preferred URL.

Quick Reference

  • Canonical URLs tell search engines which version of a page to index
  • Prevents duplicate content penalties from URL variations
  • Use absolute URLs including protocol and domain
  • Self-referencing canonicals are a best practice

Check

Verify that this page has a canonical URL tag and that it points to the correct preferred version.

Fix

Add or correct the canonical URL tag in the head section to prevent duplicate content issues.

Explain

Explain how canonical URLs help search engines understand the preferred version of duplicate or similar pages.

Code Review

Review metadata generation, rendered HTML, structured data, and response headers related to Set canonical URLs for all pages. 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/seo/canonical-url

常见问题

canonical 网址解决什么问题?

这项技能说明,它可以防止重复内容把排名信号分散到同一页面的不同版本上。

页面应该指向它自己吗?

这项技能说明,自引用的 canonical 是最佳实践。

地址应该使用相对路径吗?

不应该。这项技能建议使用包含协议和域名的绝对网址。

详情

作者的原始描述

Use when auditing metadata, crawlability, structured data, or indexability related to Set canonical URLs for all pages. Verify the rendered HTML and HTTP response rather than relying only on source files.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能