# HTML robots 标签参考

URL: https://caijiao.org/reference/html/robots
Source: docs/reference/html/robots.md
Description: robots meta 控制搜索引擎索引和跟踪行为。

robots meta 控制搜索引擎索引和跟踪行为。

## 语法

```text
<meta name="robots" content="noindex,nofollow">
```

## 最小示例

```js
document.querySelector('meta[name="robots"]')?.content;
```

## 常见错误

- 只看语法不看运行环境限制。
- 没有处理错误、权限或兼容性分支。
- 示例上线前应结合真实浏览器、服务器或 Git 仓库验证。

## 相关内容

- [HTML 教程](/html/)
- [HTML Reference](/reference/html/)
- [SEO 建站问题](/how-to/seo-website/)
