You can add DNS records using the Form Editor Mode or the Visual Editor Mode.
After adding a zone to Private Zone, you must add Private Zone for it before you can configure an effective scope. Within the effective scope, the private DNS records for the zone in Private Zone override its public DNS records.
Form editor mode
-
Go to the Alibaba Cloud DNS - Private Zone console.
-
On the Private Zone page, click the User Defined Zones tab.
-
On the User Defined Zones tab, find the target zone and click Settings in the Actions column.
-
On the Settings tab, click Add Record. In the dialog box, select Form Editor Mode.
-
In the Add Record dialog box, configure the parameters for the DNS record and click OK.
-
In the Change Resource Record Confirmation dialog box, verify the configuration and click OK.
-
Return to the User Defined Zones tab. Find the target zone and click Effective Scope in the Actions column. In the Effective Scope dialog box, you can configure two types of scopes: Effective in Alibaba Cloud VPC (select the VPCs to associate from the drop-down list; you can associate VPCs across accounts by using Centralized DNS Management for VPC) and Effective in Self-hosted DNS Cluster (select a deployed self-hosted DNS cluster). To prevent resolution failures from an empty zone, we recommend configuring the effective scope after you add DNS records. After you complete the configuration, click OK.
NoteThe procedure for adding DNS records is the same for a Private Zone and an acceleration zone. However, an acceleration zone allows you to configure custom resolution lines and weight-based routing for A, AAAA, and CNAME records.
For more information about the supported record types and their usage, see Supported DNS record types for Private Zone.
DNS record examples
A record
This example shows how to add an A record for a zone in Private Zone.
On the Add Record page, select Form Editor Mode. Set record type to A, host record to www, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to round robin. In the Record Set, add the record value 192.168.1.1, and then click OK.
AAAA record
This example shows how to add an AAAA record for a zone in Private Zone.
Select Form Editor Mode. Set record type to AAAA. Set host record to www, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to round robin. In the Record Set, add the corresponding IPv6 address as the record value.
CNAME record
This example shows how to add a CNAME record for a zone in Private Zone.
In the Add Record panel, set record type to CNAME, host record to demo, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to weight. In the Record Set, add the record value www.aliyundoc.com, set the weight to 1, and then click OK.
MX record
This example shows how to add an MX record for a zone in Private Zone.
Select the Form Editor Mode tab. Set record type to MX, host record to demo, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to round robin. In the Record Set, set record value to mail.qiyue.com, set priority to 5, and then click OK.
TXT record
This example shows how to add a TXT record for a zone in Private Zone.
Select the Form Editor Mode tab. Set record type to TXT, host record to _auth, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to round robin. In the Record Set, add the corresponding record value, and then click OK.
PTR record
You must configure a reverse lookup zone before you can add a PTR record. For more information, see Reverse lookup and PTR records.
SRV record
An SRV record identifies a server that provides a specific service. This type of record is commonly used for directory management in Microsoft systems.
-
Record type: Select SRV.
-
Host record: The format is _service._protocol.
Example: _sip._tcp
-
Record value: The format is priority weight port target_host. Separate each value with a space.
Example: 0 5 5060 sipserver.example.com
-
The time-to-live (TTL) specifies the caching duration. A smaller value indicates that DNS record updates take effect faster across different locations.
When you add an SRV record, set record type to SRV. For host record, enter
_sip._tcp(in the format of "_service._protocol"). For record value, enter0 5 5060 sipserver.example(in the format of "priority weight port target_host").
Visual editor mode
The Visual Editor Mode allows you to visually orchestrate traffic routing for complex scenarios that involve multiple resolution lines and record types. This provides a clearer overview of your DNS traffic scheduling. The following rules apply:
-
In Visual Editor Mode, all DNS records in a record set share the same host record and TTL.
-
You can configure multiple query source lines. By default, adding a record set creates one resolution line. To add more lines, click + Query Source.
-
Within the same query source line, you can add multiple record types, such as A, AAAA, and CNAME, by clicking + Record Type.
-
For the same query source and record type, you can add multiple record values by clicking the + icon next to the record value field.
Procedure
-
Go to the Alibaba Cloud DNS - Private Zone console.
-
On the Private Zone page, click the User Defined Zones tab.
-
On the User Defined Zones tab, find the target zone and click Settings in the Actions column.
-
On the Settings tab, click Add Record. In the dialog box that appears, select Visual Editor Mode.
-
In the Add Record dialog box, configure the parameters for the DNS record and click OK.
-
In the Change Resource Record Confirmation dialog box, verify the configuration and click OK.
-
On the User Defined Zones tab, find the target zone and click Effective Scope in the Actions column to select the VPCs for which the zone takes effect.
Add records for a standard zone
DNS records for a standard zone do not support custom resolution lines or weight-based routing.
On the Add Record page, switch to Visual Editor Mode to visually orchestrate DNS records in a tree view. After you enter a host record, such as www, and set the TTL, different record types are displayed as branches on the right. For example, the A record branch contains two record values, 192.168.1.1 and 192.168.1.2, and the MX record branch contains mx1.qiye.aliyun.com with a priority of 5 and mx2.qiye.aliyun.com with a priority of 10. You can add or delete each record by using the buttons on the right.
-
If a query matches multiple A or AAAA records, all corresponding IP addresses are returned.
-
If a query matches multiple CNAME records, only one CNAME record is returned at a time.
Add records for an acceleration zone
The procedure for adding a DNS record for an acceleration zone is the same as for a standard zone. However, when you configure the parameters, A and AAAA records support both round robin and weight-based routing. If you select the weight mode, you can adjust the weight ratio by setting the weight parameter for the record value.
-
CNAME records support only weight-based routing, and you can adjust the weight value.
-
In round robin mode, all addresses are returned.
In Visual Editor Mode, resolution rules are presented in a tree structure. The domain name is on the left. You can use Query Source to configure different record types as branches for different resolution lines, such as the default line and lines for specific regions like China (Beijing). In addition to A, AAAA, and CNAME records, MX records are also supported. For MX records, you can set the priority parameter.
For more information about the supported record types and their usage, see Supported DNS record types for Private Zone.