使用 Azure 门户管理 DNS 记录和记录集Manage DNS records and record sets by using the Azure portal

本文演示如何通过使用 Azure 门户来管理 DNS 区域的记录集和记录。This article shows you how to manage record sets and records for your DNS zone by using the Azure portal.

请务必了解 DNS 记录集与单独的 DNS 记录之间的差异。It's important to understand the difference between DNS record sets and individual DNS records. 记录集是区域中具有相同名称和相同类型的记录的集合。A record set is a collection of records in a zone that have the same name and are the same type. 有关详细信息,请参阅使用 Azure 门户创建 DNS 记录集和记录For more information, see Create DNS record sets and records by using the Azure portal.

创建新的记录集和记录Create a new record set and record

若要在 Azure 门户中创建记录集,请参阅使用 Azure 门户创建 DNS 记录To create a record set in the Azure portal, see Create DNS records by using the Azure portal.

查看记录集View a record set

  1. 在 Azure 门户中,转到“DNS 区域”边栏选项卡。In the Azure portal, go to the DNS zone blade.

  2. 搜索记录集,并选择它。Search for the record set and select it. 这会打开记录集属性。This opens the record set properties.

    搜索记录集

将新记录添加到记录集Add a new record to a record set

可以将最多 20 条记录添加到任何记录集。You can add up to 20 records to any record set. 记录集不能包含两个相同的记录。A record set cannot contain two identical records. 可以创建空记录集(具有零个记录),但它不会出现在 Azure DNS 名称服务器中。Empty record sets (with zero records) can be created, but do not appear on the Azure DNS name servers. CNAME 类型的记录集最多可以包含一条记录。Record sets of type CNAME can contain one record at most.

  1. 在 DNS 区域的“记录集属性”边栏选项卡中,单击你想要将记录添加到的记录集。On the Record set properties blade for your DNS zone, click the record set that you want to add a record to.

    选择记录集

  2. 过填写字段指定记录集的属性。Specify the record set properties by filling in the fields.

    添加记录

  3. 单击边栏选项卡顶部的“保存” 以保存设置。Click Save at the top of the blade to save your settings. 然后关闭该边栏选项卡。Then close the blade.

  4. 将在角落中看到正在保存该记录。In the corner, you will see that the record is saving.

    保存记录集

保存记录集后,“DNS 区域”边栏选项卡中的这些值将反映新记录。After the record has been saved, the values on the DNS zone blade will reflect the new record.

更新记录Update a record

更新现有记录集的记录时,可以更新的字段取决于正在使用的记录类型。When you update a record in an existing record set, the fields you can update depend on the type of record you're working with.

  1. 在记录集的“记录集属性”边栏选项卡中,搜索记录。On the Record set properties blade for your record set, search for the record.

  2. 修改记录。Modify the record. 修改记录时,可以更改记录的可用设置。When you modify a record, you can change the available settings for the record. 在下面的示例中,已选择“IP 地址”字段,并且 IP 地址正在修改中。In the following example, the IP address field is selected, and the IP address is in the process of being modified.

    修改记录

  3. 单击边栏选项卡顶部的“保存” 以保存设置。Click Save at the top of the blade to save your settings. 在右上角中,会看到该记录已保存的通知。In the upper right corner, you'll see the notification that the record has been saved.

    已保存记录集

保存记录后,记录集在“DNS 区域”边栏选项卡中的值将反映更新的记录。After the record has been saved, the values for the record set on the DNS zone blade will reflect the updated record.

从记录集中删除记录Remove a record from a record set

Azure 门户可用于从记录集中删除记录。You can use the Azure portal to remove records from a record set. 请注意,从记录集中删除最后一条记录不会删除记录集。Note that removing the last record from a record set does not delete the record set.

  1. 在记录集的“记录集属性”边栏选项卡中,搜索记录。On the Record set properties blade for your record set, search for the record.

  2. 单击要删除的记录。Click the record that you want to remove. 然后选择“删除” 。Then select Remove.

    删除记录

  3. 单击边栏选项卡顶部的“保存” 以保存设置。Click Save at the top of the blade to save your settings.

  4. 删除记录后,记录在“DNS 区域”边栏选项卡中的值将反映删除操作。After the record has been removed, the values for the record on the DNS zone blade will reflect the removal.

删除记录集Delete a record set

  1. 在记录集的“记录集属性”边栏选项卡中,搜单击“删除”。On the Record set properties blade for your record set, click Delete.

    删除记录集

  2. 将出现一条消息,询问你是否想要删除记录集。A message appears asking if you want to delete the record set.

  3. 验证该名称与要删除的记录集是否匹配,并单击“”。Verify that the name matches the record set that you want to delete, and then click Yes.

  4. 在“DNS 区域”边栏选项卡中,确认记录集不再出现。On the DNS zone blade, verify that the record set is no longer visible.

使用 NS 和 SOA 记录Work with NS and SOA records

自动创建的 NS 和 SOA 记录的管理方式与其他记录类型不同。NS and SOA records that are automatically created are managed differently from other record types.

修改 SOA 记录Modify SOA records

不能在区域顶点(名称 =“@”)从自动创建的 SOA 记录集中添加或删除记录。You cannot add or remove records from the automatically created SOA record set at the zone apex (name = "@"). 但是,可以修改 SOA 记录和记录集 TTL 中的任何参数(“Host”除外)。However, you can modify any of the parameters within the SOA record (except "Host") and the record set TTL.

修改区域顶点处的 NS 记录Modify NS records at the zone apex

在每个 DNS 区域自动创建区域顶点处的 NS 记录集。The NS record set at the zone apex is automatically created with each DNS zone. 其中包含分配给该区域的 Azure DNS 名称服务器名称。It contains the names of the Azure DNS name servers assigned to the zone.

可向此 NS 记录集添加其他名称服务器,从而支持与多个 DNS 提供商共同托管域。You can add additional name servers to this NS record set, to support co-hosting domains with more than one DNS provider. 还可修改此记录集的 TTL 和元数据。You can also modify the TTL and metadata for this record set. 但是,无法删除或修改预填充的 Azure DNS 名称服务器。However, you cannot remove or modify the pre-populated Azure DNS name servers.

请注意,这仅适用于区域顶点处的 NS 记录集。Note that this applies only to the NS record set at the zone apex. 区域中的其他 NS 记录集(用于委派子区域)不受约束,可进行修改。Other NS record sets in your zone (as used to delegate child zones) can be modified without constraint.

删除 SOA 或 NS 记录集Delete SOA or NS record sets

不能在区域顶点处(名称 =“@”)删除创建区域时自动创建的 SOA 和 NS 记录集。You cannot delete the SOA and NS record sets at the zone apex (name = "@") that are created automatically when the zone is created. 删除该区域时,会自动删除这些记录集。They are deleted automatically when you delete the zone.

后续步骤Next steps