> 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" %}
**例如：** 上的 CAA 记录 `yourcompany.example` 也会适用于 `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: 跟踪`，则您的自定义跟踪域名可能无法正常运行。我们建议在任何 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.
