> For the complete documentation index, see [llms.txt](https://helps.ptengine.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helps.ptengine.com/cn/faq/tracking-code/subdomain-tracking.md).

# 网站子域监测

**子域名不用单独登记。** 只要登记了主域名，它下面的所有子域名都会被监测到。

***

## 规则 <a href="#the-rule" id="the-rule"></a>

一个档案可以登记多个域名；而**无论有多少子域名，都算同一个域名**。

例如这三个站点：

```
www.sample.co.jp
store.sample.co.jp
sale.sample.co.jp
```

它们同属 `sample.co.jp`，**只需登记 `sample.co.jp` 这一个**，三个站点就都在监测范围内了。

***

## 要注意的两件事 <a href="#notes" id="notes"></a>

* 登记了主域名不等于装好了代码 —— **每个子域名的页面上都要有基础代码**
* 用户在子域名之间跳转时，默认**不是**同一次会话。需要连起来算的话，另见 [跨域设置](https://helps.ptengine.com/cn/insight/setting/cross-domain.md)

***

## 相关页面 <a href="#related-pages" id="related-pages"></a>

* [添加域名](https://helps.ptengine.com/cn/insight/setting/add-domain.md)
* [主域名和子域名](https://helps.ptengine.com/cn/faq/tag-and-domain/domain-main-vs-sub.md)
* [跨域设置](https://helps.ptengine.com/cn/insight/setting/cross-domain.md)
* [基础代码正确部署但没有数据流入](https://helps.ptengine.com/cn/faq/tracking-code/no-data-after-deploy.md)
