# 添加 DNS 记录

\
如果终端用户通过域名访问您的服务，请在您的服务提供商平台上将 Zenlayer 全球加速器 (ZGA) 提供的 CNAME 记录添加到您的 DNS 记录中，部署成功后执行此操作。

#### **1. CNAME 记录（推荐）**

\
部署成功后，ZGA 将为您的加速器分配一个 CNAME 记录，您可以在加速器列表中找到它（参见 [管理加速器](/welcome/cn/global-accelerator/get-started/manage-accelerators.md)）。您需要将 CNAME 记录添加到您的 DNS 中，以便您的域名在加速区域中解析为 ZGA 的 CNAME 记录。

***\*关于 CNAME***\
\&#xNAN;*A CNAME（规范名称）是 DNS（域名系统）中的一种资源记录，用于将一个域名（别名）映射到另一个域名（规范名称）。这在从单个 IP 地址运行多个服务（例如 FTP 服务器和 Web 服务器，每个服务运行在不同的端口）时，可以提供便利。例如，可以将* [*ftp.example.com*](https://zenlayer.lightning.force.com/lightning/r/Knowledge__kav/ka06S0000015JcVQAU/ftp.example.com) *和 [www.example.com](http://www.example.com) 指向* [*example.com*](http://example.com/) *的 DNS 条目，而该条目又指向 IP 地址。（来自维基百科）*

请按照以下指南将 CNAME 记录添加到您的 DNS 中。

| AWS            | [创建和管理流量策略 - Amazon Route 53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/traffic-policies.html)                                |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| NS1            | [创建 DNS 记录 – NS1 帮助中心](https://help.ns1.com/hc/en-us/articles/360020258073-Creating-a-DNS-record)                                             |
| Cloudflare     | [在 Cloudflare 中管理 DNS 记录 – Cloudflare 帮助中心](https://support.cloudflare.com/hc/en-us/articles/360019093151-Managing-DNS-records-in-Cloudflare) |
| GoDaddy        | [添加 CNAME 记录 \| 域名 - GoDaddy 帮助](https://www.godaddy.com/help/add-a-cname-record-19236)                                                       |
| Google Domains | [管理资源记录 - Google Domains 帮助](https://support.google.com/domains/answer/3290350#zippy=%2Cadd-a-resource-record)                                |

\
如果您使用其他 DNS 服务提供商，请直接联系他们以获取如何添加 CNAME 记录的说明。

#### **2. A 记录（地址记录）**

*\*如果您已添加 CNAME 记录，则无需添加 A 记录。我们推荐您添加 CNAME 记录。*

部署成功后，ZGA 将为您的每个加速区域分配一个 VIP（虚拟 IP），您可以在加速器列表中找到它（参见 [管理加速器](/welcome/cn/global-accelerator/get-started/manage-accelerators.md)）。您可以将 A 记录添加到您的 DNS 中，以便您的域名在每个加速区域中解析为 ZGA 的 IP 地址。

请按照 **CNAME 记录** 部分中的指南将 A 记录添加到您的 DNS 中。

*\*由于每个 VIP 都分配给一个加速区域，请为每个区域添加一个单独的 A 记录。（某些 DNS 服务提供商可能不支持指定地理位置。在这种情况下，不推荐使用 A 记录，而应添加 CNAME 记录。）*

您的加速器在 DNS 记录更新后将开始路由流量。


---

# Agent Instructions: 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:

```
GET https://docs.console.zenlayer.com/welcome/cn/global-accelerator/get-started/add-dns-record.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
