Add a DNS record

Updated at:

After adding a zone to Private Zone, you must add DNS records before you can configure an effective scope. Within the effective scope, the DNS records in Private Zone override the corresponding records in the Public Zone.

Add method

  1. Go to the Alibaba Cloud DNS - Private Zone console.

  2. On the Authoritative Zone tab, click User Defined Zones.

  3. On the User Defined Zones tab, find the target zone and click Settings in the Actions column.

  4. On the Settings tab, click Add Record.

  5. In the Add Record dialog box, configure the parameters for the DNS record and click OK.

  6. In the Change Resource Record Confirmation dialog box, verify the configuration and click OK.

  7. 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 VPCs and Effective in on-premises DNS clusters. 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.

    For more information about the supported record types and their usage, see Supported DNS record types for Private Zone.

DNS record examples

A record

Add an A record to map a hostname to an IPv4 address.

Example: Click Add Record. Set record type to A, hostname to www, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to round robin. Add the record value 192.168.1.1, and then click OK.

AAAA record

Add an AAAA record to map a hostname to an IPv6 address.

Example: Click Add Record. Set record type to AAAA. Set hostname to www, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to round robin. Add the corresponding IPv6 address as the record value.

CNAME record

Add a CNAME record to map a hostname to another domain name.

Example: Click Add Record. In the Add Record panel, set record type to CNAME, hostname to demo, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to weight. Add the record value www.aliyundoc.com, set the weight to 1, and then click OK.

MX record

Add an MX record to specify the mail server for the zone.

Example: Click Add Record. Set record type to MX, hostname to demo, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to round robin. Set record value to mail.qiyue.com, set priority to 5, and then click OK.

TXT record

Add a TXT record to store text-based information for the zone.

Example: Click Add Record. Set record type to TXT, hostname to _auth, Query Source to Default, and TTL to 1 Minute. Set Record Value Load Balancing Policy to round robin. 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, 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 means record updates propagate faster.

    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, enter 0 5 5060 sipserver.example (in the format of "priority weight port target_host").