# 链接最佳实践

> Google 通常只抓取带 href 的 a 元素链接，纯 JavaScript 链接可能不会被跟随。锚文本应描述清楚、简洁且相关。你在意的每个页面至少要有一个站内链接，但每页的链接数量没有理想值。

- URL: https://geo.casa/zh-cn/content-structured-data/link-best-practices/
- 参考 · 官方文档已说明
- 审核于: 2026-10-25

## 让链接可被抓取

> **官方文档已说明:**
> 「Google 通常只能抓取带有 `href` 属性的 `<a>` HTML 元素链接。」其他格式的链接大多不会被提取。没有 `href` 属性的 `<a>` 元素，或靠脚本事件充当链接的其他标签，Google 都无法可靠地从中提取 URL。
>
> 参考来源: [Google Search Central: SEO link best practices for Google](https://developers.google.com/search/docs/crawling-indexing/links-crawlable)

```html
<!-- 可被抓取 -->
<a href="/robots-txt/">robots.txt 参考</a>

<!-- 无法可靠抓取 -->
<span onclick="go('/robots-txt/')">robots.txt 参考</span>
<a href="javascript:goTo('robots')">robots.txt 参考</a>
```

## 写好锚文本

> **官方文档已说明:**
> 锚文本是链接中可见的文字，它向用户和 Google 说明所链接页面的相关信息。好的锚文本「具有描述性、合理简洁，并且与所在页面和所链接的页面都相关」。如果锚文本由 JavaScript 插入，要确认它出现在渲染后的 HTML 中。
>
> 参考来源: [Google Search Central: SEO link best practices for Google](https://developers.google.com/search/docs/crawling-indexing/links-crawlable)

## 链接到每个重要页面

> **官方文档已说明:**
> 「你在意的每个页面都应至少有一个来自网站内其他页面的链接。」至于一个页面应包含多少链接，并不存在理想的数量。
>
> 参考来源: [Google Search Central: SEO link best practices for Google](https://developers.google.com/search/docs/crawling-indexing/links-crawlable)

## 本站的做法

条目之间的每个链接，都是服务端渲染 HTML 中普通的 `<a href>`，锚文本使用目标条目的标题。每个条目都会被以下位置链接：

- 所在专题页
- 该领域的侧边栏
- A–Z 索引
- 通常还有相关条目

因此不存在没有链接指向的已发布页面。

## 参考来源

- [Google Search Central: SEO link best practices for Google](https://developers.google.com/search/docs/crawling-indexing/links-crawlable)
