> 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 域集成*。请参阅 [设置自定义追踪域名](/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 证书管理

您的自定义跟踪域的 SSL 证书由 impact.com 通过 Cloudflare 自动签发和续期。

* 请勿尝试手动为您的跟踪子域签发、安装或管理 SSL 证书。
* 请勿通过单独的证书颁发机构为您的跟踪子域配置证书。这可能会与自动续期产生冲突。
* 在正常运行情况下，证书续期无需任何操作。

#### 定期验证您的跟踪域

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

更换 `goto.yourcompany.example` 使用您的跟踪域。

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

一个 <mark style="color:$success;">正常</mark> 响应将包含 `跟踪`.

如果此端点无法加载、返回证书错误，或不包含 `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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
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=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
