文档站常常会积累版本漂移、重复 guide 和重叠 reference 路径。这个示例展示 canonical tags 应如何让一个稳定 docs URL 成为明确赢家。
Example snippet
canonical tag 应该指向你真正希望 assistants 和搜索系统当作稳定参考页的那个 URL。
<head>
<title>Authentication Setup | Product Docs</title>
<link rel="canonical" href="https://example.com/docs/setup/authentication" />
</head>如果 canonical 指向的页面更弱、更旧、或者比当前 docs 路径更难到达,这个 tag 就没有真正起作用。
Why it matters
Review it carefully
Related pages
Next step
如果多个文档变体还在竞争同一主题,先修层级。等 docs 结构本身连贯后,再用 canonical tags 把赢家路径明确下来。