> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/platform-features/tracking/set-up-tracking/best-practices-for-express-domain-integration.md).

# Express 域名集成最佳实践

以下最佳实践可确保您的 *Express 域名集成*长期稳定且安全。请参阅 [设置自定义跟踪域名](https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/platform-features/tracking/set-up-tracking/set-up-a-custom-tracking-domain.md) 了解初始设置。

{% hint style="success" %}
**注意：** 如果您使用自定义代理配置，您的组织会直接通过 CDN 提供商管理 SSL 证书和 DNS 安全策略，因此以下与证书相关的要求不适用。
{% endhint %}

#### 保留必需的 DNS 配置

为确保自定义跟踪域名持续可靠运行，并避免跟踪中断，请遵循以下 DNS 指南：

* 确保自定义跟踪子域名的 CNAME 记录指向：

```
customtracking.impact.com.cdn.cloudflare.net
```

* 除非 impact.com 指示，否则请勿删除或修改此 CNAME 记录。
* 我们建议使用较低的 TTL（例如 300 秒），以便在恢复或迁移期间更快地传播。
* 发布前请仔细检查 DNS 变更。配置错误可能导致跟踪链接无法解析。

{% hint style="warning" %}
**重要提示：** 删除或修改此 CNAME 记录会立即导致您的自定义跟踪域名无法使用。SSL 证书的签发和续订都依赖于此记录保持不变。
{% endhint %}

#### 配置 CAA 记录

如果您的组织使用 *证书颁发机构授权 (CAA)* DNS 记录来限制哪些证书颁发机构可以为您的域名签发 SSL 证书，则必须允许为您的跟踪域名提供服务的证书颁发机构。

除非被覆盖，否则在父域名上配置的 CAA 记录会应用于所有子域名。

{% hint style="info" %}
**例如：** 在 `yourcompany.example` 上配置的 CAA 记录也会应用于 `goto.yourcompany.example`.
{% endhint %}

<details>

<summary>必需的 CAA 记录</summary>

添加并确保允许以下颁发者：

`yourcompany.example. CAA 0 issue "pki.goog"`

SSL 证书由 Google Trust Services（`pki.goog`).

</details>

<details>

<summary>建议的 CAA 记录</summary>

我们建议允许 `letsencrypt.org`:

`yourcompany.example. CAA 0 issue "letsencrypt.org"`

这有助于在未来证书提供商发生变化时避免服务中断。

</details>

<details>

<summary>检查当前的 CAA 记录</summary>

使用 DNS 查询工具或命令行检查域名的 CAA 记录： `dig CAA yourcompany.example`.

如果响应为空（没有 CAA 记录），则无需采取任何操作。默认情况下，所有证书颁发机构均获准签发证书。

如果响应包含 `issue` 条目，请确认其中包含 `pki.goog` 和 `letsencrypt.org` 。

如果您目前没有 CAA 记录，则无需添加。不过，如果将来添加或收紧 CAA 限制，请确保仍允许必需的颁发者。否则，SSL 证书续订将失败，您的自定义跟踪域名也将停止工作。

{% hint style="success" %}
**注意：** CAA 记录由您的 DNS 提供商管理。impact.com 无法覆盖您域名的 CAA 限制。
{% endhint %}

</details>

#### 协调 DNS 和安全设置变更

更改跟踪域名或其父域名之前，请与内部 DNS 或安全团队协调，并通知 impact.com 客户成功团队 (CS)。

应用变更之前，我们建议：

* 确认所需的 CNAME 目标（`customtracking.impact.com.cdn.cloudflare.net`）将保持不变。
* 确认所需的 CAA 颁发者（`pki.goog`）在所有适用的域名层级均仍获准使用。
* 仔细检查变更，确保不会影响跟踪域名的 DNS 解析或 SSL 证书签发。

<details>

<summary>可能影响自定义跟踪域名的变更</summary>

* CNAME 记录（跟踪子域名或父域名）
* 域名层级任意位置的 CAA 记录
* DNSSEC 配置
* DNS 服务商迁移或托管变更
* 域名所有权、委派或注册商转移
* 影响证书签发或 DNS 解析的安全策略

</details>

#### SSL 证书管理

impact.com 通过 Cloudflare 自动为您的自定义跟踪域名配置并续期 SSL 证书。

* 请勿尝试手动为跟踪子域名签发、安装或管理 SSL 证书。
* 请勿通过其他证书颁发机构为跟踪子域名配置证书。这可能会与自动续期冲突。
* 正常情况下，无需对证书续期采取任何操作。

#### 定期验证跟踪域名

在浏览器中访问以下端点，确认跟踪域名是否正常工作：

将 `goto.yourcompany.example` 替换为您的跟踪域名。

```
https://goto.yourcompany.example/monitor-stats/ma_hostInfo.appName
```

正常 <mark style="color:$success;">的</mark> 响应中会包含 `tracking`.

如果此端点无法加载、返回证书错误，或不包含 `appName: tracking`，则您的自定义跟踪域名可能无法正常工作。我们建议在每次 DNS 或安全设置变更后检查此端点，并设置自动监控，以便在问题影响跟踪之前及时发现。

#### 故障排除与支持

如果跟踪域名停止解析，或链接停止重定向：

1. 确认您的 CNAME 记录仍指向：

```
customtracking.impact.com.cdn.cloudflare.net
```

2. 检查近期是否更改过 DNS、CAA 或安全设置。
3. [联系支持团队](https://app.impact.com/support/portal.ihtml?createTicket=true) 并提供您的自定义跟踪域名、问题开始的时间以及近期进行的任何安全设置变更。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/platform-features/tracking/set-up-tracking/best-practices-for-express-domain-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
