界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

canonical-header

canonical-header

【数据与研究】Use when auditing metadata, crawlability, structured data, or indexability related to Sync HTML canonical tags and Link headers. Verify the rendered HTML and HTTP response rather than relying only on source files.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: canonical-header description: "Use when auditing metadata, crawlability, structured data, or indexability related to Sync HTML canonical tags and Link headers. Verify the rendered HTML and HTTP response rather than relying only on source files." metadata: category: seo priority: medium difficulty: intermediate estimatedTime: "10" source: frontendchecklist.io url: https://frontendchecklist.io/rules/seo/canonical-header

Sync HTML canonical tags and Link headers

Conflicting canonical-url signals can lead search engines to ignore both declarations, potentially causing duplicate content issues and incorrect indexing.

Quick Reference

  • Ensure the rel="canonical" tag in your HTML matches the Link canonical-url header if both are used
  • Avoid sending conflicting signals to search engines about the primary version of a page
  • Maintain consistency across all methods of declaring your canonical URL

Check

Compare the HTML canonical tag with the HTTP Link header to ensure they point to the exact same URL.

Fix

Update either the HTML tag or the HTTP header so that they provide a consistent canonical URL signal.

Explain

Explain the risks of sending conflicting technical SEO signals to search engine crawlers.

Code Review

Review metadata generation, rendered HTML, structured data, and response headers related to Sync HTML canonical tags and Link headers. 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-header

我的收藏