Azure DNS 常见问题解答Azure DNS FAQ

关于 Azure DNSAbout Azure DNS

什么是 Azure DNS?What is Azure DNS?

域名系统 (DNS) 将网站或服务名称转换或解析为它的 IP 地址。The Domain Name System (DNS) translates, or resolves, a website or service name to its IP address. Azure DNS 是 DNS 域的托管服务。Azure DNS is a hosting service for DNS domains. 它使用 Azure 基础结构提供名称解析。It provides name resolution by using Azure infrastructure. 通过在 Azure 中托管域,可以使用与其他 Azure 服务相同的凭据、API、工具和计费来管理 DNS 记录。By hosting your domains in Azure, you can manage your DNS records by using the same credentials, APIs, tools, and billing as your other Azure services.

Azure DNS 中的 DNS 域托管在 DNS 名称服务器的 Azure 全局网络上。DNS domains in Azure DNS are hosted on the Azure global network of DNS name servers. 此系统使用任意广播网络,以便每个 DNS 查询由最近的可用 DNS 服务器来应答。This system uses Anycast networking so that each DNS query is answered by the closest available DNS server. Azure DNS 为域提供更快的性能和高可用性。Azure DNS provides fast performance and high availability for your domain.

Azure DNS 基于 Azure 资源管理器。Azure DNS is based on Azure Resource Manager. Azure DNS 可以利用资源管理器功能,例如 Azure 基于角色的访问控制、审核日志和资源锁定。Azure DNS benefits from Resource Manager features such as Azure role-based access control, audit logs, and resource locking. 可以通过 Azure 门户、Azure PowerShell cmdlet 和跨平台 Azure CLI 来管理域和记录。You can manage domains and records via the Azure portal, Azure PowerShell cmdlets, and the cross-platform Azure CLI. 需要自动 DNS 管理的应用程序可通过 REST API 和 SDK 与服务集成。Applications that require automatic DNS management can integrate with the service via the REST API and SDKs.

Azure DNS 的费用是多少?How much does Azure DNS cost?

Azure DNS 计费模型基于 Azure DNS 中托管的 DNS 区域数。The Azure DNS billing model is based on the number of DNS zones hosted in Azure DNS. 此外,它基于这些区域接收的 DNS 查询数。It's also based on the number of DNS queries they receive. 根据使用情况提供折扣。Discounts are provided based on usage.

有关详细详细,请参阅 Azure DNS 定价页For more information, see the Azure DNS pricing page.

什么是 SLA for Azure DNS?What is the SLA for Azure DNS?

Azure 保证在任何情况下,有效的 DNS 请求将从至少一个 Azure DNS 名称服务器中收到响应。Azure guarantees that valid DNS requests receive a response from at least one Azure DNS name server 100% of the time.

有关详细详细,请参阅 Azure DNS SLA 页For more information, see the Azure DNS SLA page.

什么是 DNS 区域?What is a DNS zone? 它是否等同于 DNS 域?Is it the same as a DNS domain?

域在域名系统中具有唯一名称。A domain is a unique name in the domain name system. 例如 contoso.com。An example is contoso.com.

DNS 区域用来托管某个特定域的 DNS 记录。A DNS zone is used to host the DNS records for a particular domain. 例如,域 contoso.com 可能包含几条 DNS 记录。For example, the domain contoso.com might contain several DNS records. 这些记录可能包含 mail.contoso.com(用于邮件服务器)和 www.contoso.com(用于网站)。The records might include mail.contoso.com for a mail server and www.contoso.com for a website. 这些记录托管在 DNS 区域 contoso.com 中。These records are hosted in the DNS zone contoso.com.

域名仅是一个名称。 A domain name is just a name. DNS 区域是包含域名的 DNS 记录的数据资源。A DNS zone is a data resource that contains the DNS records for a domain name. 可以使用 Azure DNS 托管 DNS 区域,以及管理 Azure 中域的 DNS 记录。You can use Azure DNS to host a DNS zone and manage the DNS records for a domain in Azure. 它还提供 DNS 名称服务器,用于回答来自 Internet 的 DNS 查询。It also provides DNS name servers to answer DNS queries from the Internet.

是否需要购买 DNS 域名才能使用 Azure DNS?Do I need to buy a DNS domain name to use Azure DNS?

不一定。Not necessarily.

无需购买域即可托管 Azure DNS 中的 DNS 区域。You don't need to buy a domain to host a DNS zone in Azure DNS. 没有域名也可随时创建 DNS 区域。You can create a DNS zone at any time without owning the domain name. 仅当此区域的 DNS 查询定向到分配给该区域的 Azure DNS 名称服务器时,才会解析这些查询。DNS queries for this zone resolve only if they're directed to the Azure DNS name servers assigned to the zone.

若要将 DNS 区域链接到全局 DNS 层级结构,则必须购买域名。To link your DNS zone into the global DNS hierarchy, you must buy the domain name. 然后,来自全球任意位置的 DNS 查询会使用 DNS 记录来查找 DNS 区域和做出应答。Then, DNS queries from anywhere in the world find your DNS zone and answer with your DNS records.

Azure DNS 功能Azure DNS features

在流量管理器中使用域名顶点的别名记录时,是否存在任何限制?Are there any restrictions when using alias records for a domain name apex with Traffic Manager?

是的。Yes. 必须在 Azure 流量管理器中使用静态公共 IP 地址。You must use static public IP addresses with Azure Traffic Manager. 使用静态 IP 地址配置 外部终结点 目标。Configure the External endpoint target by using a static IP address.

Azure DNS 是否支持基于 DNS 的流量路由或终结点故障转移?Does Azure DNS support DNS-based traffic routing or endpoint failover?

流量管理器提供基于 DNS 的流量路由和终结点故障转移。DNS-based traffic routing and endpoint failover are provided by Traffic Manager. 流量管理器是一项独立服务,可与 Azure DNS 配合使用。Traffic Manager is a separate Azure service that can be used with Azure DNS. 有关详细信息,请参阅流量管理器概述For more information, see the Traffic Manager overview.

Azure DNS 仅支持托管静态 DNS 域,其中对某给定的 DNS 记录来说,每个 DNS 查询始终接收相同的 DNS 响应。Azure DNS only supports hosting static DNS domains, where each DNS query for a given DNS record always receives the same DNS response.

Azure DNS 是否支持域名注册?Does Azure DNS support domain name registration?

不是。No. Azure DNS 目前不支持购买域名。Azure DNS doesn't currently support the option to buy domain names. 若要购买域,必须使用第三方域名注册机构。To buy domains, you must use a third-party domain name registrar. 注册机构通常收取小额年费。The registrar typically charges a small annual fee. 然后,可将域托管在 Azure DNS 中用于管理 DNS 记录。The domains then can be hosted in Azure DNS for management of DNS records. 有关详细信息,请参阅 向 Azure DNS 委派域For more information, see Delegate a domain to Azure DNS.

我们正在 Azure 积压工作中跟踪域购买功能。The feature to buy domain names is tracked in the Azure backlog.

Azure DNS 是否支持 DNSSEC?Does Azure DNS support DNSSEC?

不是。No. Azure DNS 目前不支持域名系统安全扩展 (DNSSEC)。Azure DNS doesn't currently support the Domain Name System Security Extensions (DNSSEC).

我们正在 Azure DNS 积压工作中跟踪 DNSSEC 功能。The DNSSEC feature is tracked in the Azure DNS backlog.

Azure DNS 是否支持区域传送 (AXFR/IXFR)?Does Azure DNS support zone transfers (AXFR/IXFR)?

不是。No. Azure DNS 目前不支持区域传送。Azure DNS doesn't currently support zone transfers. 使用 Azure CLI 将 DNS 区域导入 Azure DNSDNS zones can be imported into Azure DNS by using the Azure CLI. 然后,可通过 Azure DNS 管理门户REST APISDKPowerShell cmdletCLI 工具来托管 DNS 记录。DNS records are managed via the Azure DNS management portal, REST API, SDK, PowerShell cmdlets, or the CLI tool.

我们正在 Azure DNS 积压工作中跟踪区域传送功能。The zone transfer feature is tracked in the Azure DNS backlog.

Azure DNS 是否支持 URL 重定向?Does Azure DNS support URL redirects?

不是。No. URL 重定向服务实际并非 DNS 服务。URL redirect services aren't a DNS service. 它们在 HTTP 级别而非 DNS 级别运行。They work at the HTTP level rather than the DNS level. 某些 DNS 提供商会在整体产品/服务中捆绑销售 URL 重定向服务。Some DNS providers bundle a URL redirect service as part of their overall offering. Azure DNS 目前不支持此服务。This service isn't currently supported by Azure DNS.

我们正在 Azure DNS 积压工作中跟踪 URL 重定向功能。The URL redirect feature is tracked in the Azure DNS backlog.

Azure DNS 是否支持适用于 TXT 记录集的扩展 ASCII 编码(8 位)集?Does Azure DNS support the extended ASCII encoding (8-bit) set for TXT record sets?

是的。Yes. Azure DNS 支持适用于 TXT 记录集的扩展 ASCII 编码集。Azure DNS supports the extended ASCII encoding set for TXT record sets. 但是,必须使用最新版本的 Azure REST API、SDK、PowerShell 和 CLI。But you must use the latest version of the Azure REST APIs, SDKs, PowerShell, and the CLI. 低于 2017 年 10 月 1 日版的版本或 SDK 2.1 不支持扩展的 ASCII 集。Versions older than October 1, 2017, or SDK 2.1 don't support the extended ASCII set.

例如,你可能会提供一个字符串作为 TXT 记录的值,其中包含扩展的 ASCII 字符 \128。For example, you might provide a string as the value for a TXT record that has the extended ASCII character \128. 例如“abcd\128efgh”。An example is "abcd\128efgh." Azure DNS 会在内部表示形式中使用此字符的字节值(即 128)。Azure DNS uses the byte value of this character, which is 128, in internal representation. 在进行 DNS 解析时,此字节值会在响应中返回。At the time of DNS resolution, this byte value is returned in the response. 另请注意,在考虑到解析的情况下,“abc”和“\097\098\099”是可以互换的。Also note that "abc" and "\097\098\099" are interchangeable as far as resolution is concerned.

我们遵循适用于 TXT 记录的 RFC 1035 区域文件母版格式转义规则。We follow RFC 1035 zone file master format escape rules for TXT records. 例如,按照 RFC 规则,\ 现在实际上可以对所有内容进行转义操作。For example, \ now actually escapes everything per the RFC. 如果指定 A\B 作为 TXT 记录值,则会在呈现时,仅将其解析为 ABIf you specify A\B as the TXT record value, it's represented and resolved as just AB. 如果确实需要让 TXT 记录在解析时呈现为 A\B,则需对 \ 再次执行转义操作。If you really want the TXT record to have A\B at resolution, you need to escape the \ again. 例如,指定 A\\BAs an example, specify A\\B.

此支持目前不适用于通过 Azure 门户创建的 TXT 记录。This support currently isn't available for TXT records created from the Azure portal.

别名记录Alias records

别名记录在哪些方案中有用?What are some scenarios where alias records are useful?

请参阅 Azure DNS 别名记录概述中的方案部分。See the scenarios section in the Azure DNS alias records overview.

别名记录集支持哪些记录类型?What record types are supported for alias record sets?

在 Azure DNS 区域中,别名记录集支持以下记录类型:Alias record sets are supported for the following record types in an Azure DNS zone:

  • AA
  • AAAAAAAA
  • CNAMECNAME

支持哪些资源作为别名记录集的目标?What resources are supported as targets for alias record sets?

  • 从 DNS A/AAAA 记录集指向公共 IP 资源Point to a public IP resource from a DNS A/AAAA record set. 可以创建一个 A/AAAA 记录集,并使其成为指向公共 IP 资源的别名记录集。You can create an A/AAAA record set and make it an alias record set to point to a public IP resource.
  • 从 DNS A/AAAA/CNAME 记录集指向流量管理器配置文件Point to a Traffic Manager profile from a DNS A/AAAA/CNAME record set. 可以从 DNS CNAME 记录集指向流量管理器配置文件的 CNAME。You can point to the CNAME of a Traffic Manager profile from a DNS CNAME record set. 例如,contoso.trafficmanager.cn。An example is contoso.trafficmanager.cn. 现在,还可以从 DNS 区域中的 A 或 AAAA 记录集指向包含外部终结点的流量管理器配置文件。Now, you also can point to a Traffic Manager profile that has external endpoints from an A or AAAA record set in your DNS zone.
  • 指向 Azure 内容分发网络 (CDN) 终结点Point to an Azure Content Delivery Network (CDN) endpoint. 使用 Azure 存储和 Azure CDN 创建静态网站时,这非常有用。This is useful when you create static websites using Azure storage and Azure CDN.
  • 指向同一区域中的另一 DNS 记录集Point to another DNS record set within the same zone. 别名记录可引用相同类型的其他记录集。Alias records can reference to other record sets of the same type. 例如,可以使 DNS CNAME 记录集成为相同类型的另一 CNAME 记录集的别名。For example, you can have a DNS CNAME record set be an alias to another CNAME record set of the same type. 如果希望有些记录集是别名,有些记录集不是别名,则这种安排会很有用。This arrangement is useful if you want some record sets to be aliases and some non-aliases.

是否可以从 Azure 门户创建和更新别名记录?Can I create and update alias records from the Azure portal?

是的。Yes. 除了 Azure REST API、PowerShell、CLI 和 SDK 以外,还可以在 Azure 门户中创建或管理别名记录。You can create or manage alias records in the Azure portal along with the Azure REST APIs, PowerShell, the CLI, and SDKs.

别名记录是否有助于确保在删除基础公共 IP 时,删除我的 DNS 记录集?Will alias records help to make sure my DNS record set is deleted when the underlying public IP is deleted?

是的。Yes. 此功能是别名记录的一项核心功能。This feature is one of the core capabilities of alias records. 它有助于避免应用程序用户遇到中断。It helps you avoid potential outages for users of your application.

当基础公共 IP 地址发生变化时,别名记录是否有助于确保我的 DNS 记录集更新为正确的 IP 地址?Will alias records help to make sure my DNS record set is updated to the correct IP address when the underlying public IP address changes?

是的。Yes. 此功能是别名记录的一项核心功能。This feature is one of the core capabilities of alias records. 它有助于避免应用程序出现中断或安全风险。It helps you avoid potential outages or security risks for your application.

使用 A 或 AAAA 记录的别名记录集指向流量管理器时,是否存在任何限制?Are there any restrictions when using alias record sets for A or AAAA records to point to Traffic Manager?

是的。Yes. 若要以别名形式从 A 或 AAAA 记录集指向流量管理器配置文件,流量管理器配置文件只能使用外部终结点。To point to a Traffic Manager profile as an alias from an A or AAAA record set, the Traffic Manager profile must use only external endpoints. 在流量管理器中创建外部终结点时,请提供终结点的实际 IP 地址。When you create the external endpoints in Traffic Manager, provide the actual IP addresses of the endpoints.

使用别名记录是否会产生额外的费用?Is there an additional charge to use alias records?

别名记录是对有效 DNS 记录集的限定。Alias records are a qualification on a valid DNS record set. 别名记录不会产生额外的费用。There's no additional billing for alias records.

使用 Azure DNSUse Azure DNS

是否可以使用 Azure DNS 和其他 DNS 提供程序共同托管域?Can I co-host a domain by using Azure DNS and another DNS provider?

是的。Yes. Azure DNS 支持与其他 DNS 服务共同托管域。Azure DNS supports co-hosting domains with other DNS services.

若要设置共同托管,请将域的 NS 记录修改为指向这两个提供程序的名称服务器。To set up co-hosting, modify the NS records for the domain to point to the name servers of both providers. 名称服务器 (NS) 记录控制哪些提供程序接收域的 DNS 查询。The name server (NS) records control which providers receive DNS queries for the domain. 可在 Azure DNS、另一提供程序以及父区域中修改这些 NS 记录。You can modify these NS records in Azure DNS, in the other provider, and in the parent zone. 父区域通常是通过域名注册机构配置的。The parent zone is typically configured via the domain name registrar. 有关 DNS 委派的详细信息,请参阅DNS 域委派For more information on DNS delegation, see DNS domain delegation.

此外,请确保域的 DNS 记录在 DNS 提供程序之间进行同步。Also, make sure that the DNS records for the domain are in sync between both DNS providers. Azure DNS 目前不支持 DNS 区域传送。Azure DNS doesn't currently support DNS zone transfers. 必须使用 Azure DNS 管理门户REST APISDKPowerShell cmdletsCLI 工具同步 DNS 记录。DNS records must be synchronized by using either the Azure DNS management portal, REST API, SDK, PowerShell cmdlets, or the CLI tool.

是否需向全部四个 Azure DNS 名称服务器委托我的域?Do I have to delegate my domain to all four Azure DNS name servers?

是的。Yes. Azure DNS 为每个 DNS 区域分配四个名称服务器。Azure DNS assigns four name servers to each DNS zone. 这种安排是为实现故障隔离和提高复原能力。This arrangement is for fault isolation and increased resilience. 为了符合 Azure DNS SLA,请将域委托给全部四个名称服务器。To qualify for the Azure DNS SLA, delegate your domain to all four name servers.

Azure DNS 有哪些使用限制?What are the usage limits for Azure DNS?

使用 Azure DNS 时适用以下默认限制。The following default limits apply when you use Azure DNS.

公共 DNS 区域Public DNS zones

资源Resource 限制Limit
每个订阅的公共 DNS 区域数Public DNS Zones per subscription 250 1250 1
每个公共 DNS 区域的记录集数Record sets per public DNS zone 10,000 110,000 1
公共 DNS 区域中每个记录集的记录数Records per record set in public DNS zone 2020
单个 Azure 资源的别名记录数Number of Alias records for a single Azure resource 2020

1如果需要增加这些限制,请与 Azure 支持部门联系。1If you need to increase these limits, contact Azure Support.

专用 DNS 区域Private DNS zones

资源Resource 限制Limit
每个订阅的专用 DNS 区域数Private DNS zones per subscription 10001000
每个专用 DNS 区域的记录集数Record sets per private DNS zone 2500025000
专用 DNS 区域的每个记录集的记录数Records per record set for private DNS zones 2020
每个专用 DNS 区域的虚拟网络链接数Virtual Network Links per private DNS zone 10001000
在启用了自动注册的情况下,每个专用 DNS 区域的虚拟网络链接数Virtual Networks Links per private DNS zones with auto-registration enabled 100100
在启用了自动注册的情况下,虚拟网络可以链接到的专用 DNS 区域数Number of private DNS zones a virtual network can get linked to with auto-registration enabled 11
虚拟网络可以链接的专用 DNS 区域数Number of private DNS zones a virtual network can get linked 10001000
虚拟机每秒可发送到 Azure DNS 解析程序的 DNS 查询数Number of DNS queries a virtual machine can send to Azure DNS resolver, per second 500 1500 1
每个虚拟机排队(等待响应)的最大 DNS 查询数Maximum number of DNS queries queued (pending response) per virtual machine 200 1200 1

1这些限制适用于每个单独的虚拟机,而不适用于虚拟网络级别。1These limits are applied to every individual virtual machine and not at the virtual network level. 将删除超出这些限制的 DNS 查询。DNS queries exceeding these limits are dropped.

能否在资源组或订阅之间移动 Azure DNS 区域?Can I move an Azure DNS zone between resource groups or between subscriptions?

是的。Yes. 可在资源组或订阅之间移动 DNS 区域。DNS zones can be moved between resource groups or between subscriptions.

移动 DNS 区域不会影响 DNS 查询。There's no effect on DNS queries when you move a DNS zone. 分配给区域的名称服务器将保持不变。The name servers assigned to the zone stay the same. DNS 查询将以正常的吞吐量进行处理。DNS queries are processed as normal throughout.

有关如何移动 DNS 区域的详细信息和说明,请参阅将资源移动至新资源组或订阅For more information and instructions on how to move DNS zones, see Move resources to a new resource group or subscription.

DNS 更改多久生效?How long does it take for DNS changes to take effect?

新的 DNS 区域和 DNS 记录通常很快就会显示在 Azure DNS 名称服务器中,New DNS zones and DNS records typically appear in the Azure DNS name servers quickly. 只需几秒钟。The timing is a few seconds.

对现有 DNS 记录的更改可能要在略长一段时间后才会显示。Changes to existing DNS records can take a little longer. 它们通常会在 60 秒内显示在 Azure DNS 名称服务器中。They typically appear in the Azure DNS name servers within 60 seconds. Azure DNS 外部的 DNS 客户端和 DNS 递归解析程序执行的 DNS 缓存也可能会影响显示时间。DNS caching by DNS clients and DNS recursive resolvers outside of Azure DNS also can affect timing. 若要控制此缓存持续时间,请使用每个记录集的生存时间 (TTL) 属性。To control this cache duration, use the Time-To-Live (TTL) property of each record set.

如何保护我的 DNS 区域不被意外删除?How can I protect my DNS zones against accidental deletion?

可以使用 Azure 资源管理器管理 Azure DNS。Azure DNS is managed by using Azure Resource Manager. Azure DNS 受益于 Azure 资源管理器提供的访问控制功能。Azure DNS benefits from the access control features that Azure Resource Manager provides. Azure 基于角色的访问控制可用于控制哪些用户具有对 DNS 区域和记录集的读取或写入访问权限。Azure role-based access control can be used to control which users have read or write access to DNS zones and record sets. 资源锁可防止意外修改,或防止删除 DNS 区域和记录集。Resource locks prevent accidental modification or deletion of DNS zones and record sets.

有关详细信息,请参阅保护 DNS 区域和记录For more information, see Protect DNS zones and records.

如何在 Azure DNS 中设置 SPF 记录?How do I set up SPF records in Azure DNS?

发送方策略框架 (SPF) 记录用于指定可以代表域名发送电子邮件的电子邮件服务器。Sender policy framework (SPF) records are used to specify which email servers can send email on behalf of a domain name. 正确配置 SPF 记录非常重要,可防止收件人将你的电子邮件标记为“垃圾邮件”。Correct configuration of SPF records is important to prevent recipients from marking your email as junk.

DNS RFC 最初引入了新的 SPF 记录类型来支持此方案。The DNS RFCs originally introduced a new SPF record type to support this scenario. 为了支持旧名称服务器,还允许它们使用 TXT 记录类型指定 SPF 记录。To support older name servers, they also allowed the use of the TXT record type to specify SPF records. 这种不明确性导致混乱,已通过 RFC 7208 得到解决。This ambiguity led to confusion, which was resolved by RFC 7208. 它指出必须使用 TXT 记录类型创建 SPF 记录。It states that SPF records must be created by using the TXT record type. 它还指出 SPF 记录类型已弃用。It also states that the SPF record type is deprecated.

SPF 记录受 Azure DNS 支持且必须使用 TXT 记录类型创建。SPF records are supported by Azure DNS and must be created by using the TXT record type. 不支持已过时的 SPF 记录类型。The obsolete SPF record type isn't supported. 导入 DNS 区域文件时,使用 SPF 记录类型的任何 SPF 记录将转换为 TXT 记录类型。When you import a DNS zone file, any SPF records that use the SPF record type are converted to the TXT record type.

Azure DNS 名称服务器是否通过 IPv6 解析?Do Azure DNS name servers resolve over IPv6?

是的。Yes. Azure DNS 名称服务器是双重堆栈。Azure DNS name servers are dual stack. 双重堆栈表示它们具有 IPv4 和 IPv6 地址。Dual stack means they have IPv4 and IPv6 addresses. 若要查找分配给 DNS 区域的 Azure DNS 名称服务器的 IPv6 地址,请使用 nslookup 等工具。To find the IPv6 address for the Azure DNS name servers assigned to your DNS zone, use a tool such as nslookup. 示例为 nslookup -q=aaaa <Azure DNS Nameserver>An example is nslookup -q=aaaa <Azure DNS Nameserver>.

如何在 Azure DNS 中设置 IDN?How do I set up an IDN in Azure DNS?

国际域名 (IDN) 使用 punycode 对每个 DNS 名称进行编码。Internationalized domain names (IDNs) encode each DNS name by using punycode. DNS 查询就是使用这些 punycode 编码名称构建的。DNS queries are made by using these punycode-encoded names.

若要在 Azure DNS 中配置 IDN,请将区域名称或记录集名称转换为 punycode。To configure IDNs in Azure DNS, convert the zone name or record set name to punycode. 目前,Azure DNS 原生并不支持与 punycode 之间的相互转换。Azure DNS doesn't currently support built-in conversion to or from punycode.

后续步骤Next steps