All Products
Search
Document Center

Alibaba Cloud DNS:Manage subdomains

Last Updated:Nov 25, 2024

Overview

Alibaba Cloud Domain Name System (DNS) provides independent DNS hosting and resolution services for subdomains such as second-level domains and third-level domains.

To add a subdomain, perform the following steps:

  1. Add a subdomain name.

  2. Verify the identity of the domain name registrant by using a text (TXT) record.

  3. Add DNS records for the subdomain.

  4. Add name server (NS) records for the primary domain.

For more information, see the procedure described in the following section.

Terms

Term

Description

subdomain name

For example, www.aliyun.com is a subdomain name of aliyun.com.

subdomain

If aliyun.com is the primary domain, www.aliyun.com is the second-level domain of the primary domain and test.www.aliyun.com is the third-level domain of the primary domain. Second-level domains and third-level domains are both subdomains.

subdomain management

Alibaba Cloud DNS allows you to separately manage subdomains such as second-level domains and third-level domains, as well as the DNS records of the subdomains.

Scenarios

Subdomain hosting allows you to separately manage your primary domains and subdomains. This feature applies to the following scenarios:

  1. Your primary domain DNS server is hosted by a third-party DNS service provider. For specific reasons, the server cannot migrate all DNS records to Alibaba Cloud DNS. You want to first migrate the DNS records of the subdomains to Alibaba Cloud DNS.

  2. The primary domains of multinational companies or large groups are managed by their headquarters, and branch offices need to apply for subdomains for separate management.

  3. Government-owned enterprises and financial institutions use self-managed DNS servers. However, the cost of using and maintaining the DNS servers is high. These enterprises and institutions want to authorize Alibaba Cloud DNS to separately manage their subdomains.

Procedure

Scenario 1: The primary domain is hosted by a third-party DNS service and the subdomains are hosted by Alibaba Cloud DNS.

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Authoritative DNS Resolution. On the Authoritative Domain Names tab of the page that appears, click Add Domain Name.

  3. In the Add Domain Name dialog box, enter a subdomain name and click Verify TXT Record.

    Enter a subdomain name and click Verify TXT Record

  4. In the Verify Registrant Identity message, copy the hostname and record value.

    Important

    After you copy the hostname and record value, you can close the message even if you do not click Verify. The value of the TXT record is valid for 1 day. You can verify the TXT record for up to three times. After the verifications fail, the record value is reset. You can click Verify to verify the TXT record after you add the TXT record for the primary domain name.

    Verify the identity of the domain name registrant

  5. Return to the Domain Name Resolution page, find the primary domain name for which you want to add the TXT record, and then click DNS Settings in the Actions column. On the DNS Settings page of the primary domain, click Add DNS Record. When you add the TXT record, paste the hostname and record value that you copied from the Verify Registrant Identity message.

    Hostname

    Record type

    Record value

    alidnscheck

    TXT

    60affd31e1a3420e92a32aeb4d8b4406

  1. Confirm whether the TXT record takes effect. If the TXT record takes effect, go to the Verify Registrant Identity message and click Verify.

  2. If the TXT record passes the verification, click Add Domain Name. The subdomain name is automatically displayed in the domain name list. Click the subdomain in the list to go to the DNS Settings page. On the page that appears, add DNS records.

    image

  3. Add two name server (NS) records for the primary domain. The NS records point to the DNS servers that Alibaba Cloud DNS assigns to the subdomain.

    Important

    When you add the NS records, separately set the Record Value parameter to the names of the system-assigned DNS servers on the DNS settings page of the subdomain.

    Note on the Hostname parameter:

    If you want Alibaba Cloud DNS to host the subdomain test.example.com, set the Hostname parameter to test.

    Hostname

    Record type

    Record value

    test

    NS

    ns1.alidns.com

    test

    NS

    ns2.alidns.com

Scenario 2: Both the primary domain and subdomain are hosted by Alibaba Cloud DNS but are managed by different accounts.

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Authoritative DNS Resolution. On the Authoritative Domain Names tab of the page that appears, click Add Domain Name.

  3. In the Add Domain Name dialog box, enter a subdomain name and click Verify TXT Record.

  4. In the Verify Registrant Identity message, copy the hostname and record value.

    Important

    Do not close the message after you copy the hostname and record value. Otherwise, the TXT record fails the verification because the system generates a new TXT record. You can click Verify to verify the TXT record after you add the TXT record for the primary domain.

  5. Return to the Domain Name Resolution page, find the primary domain name for which you want to add the TXT record, and then click DNS Settings in the Actions column. On the DNS Settings page of the primary domain, click Add DNS Record. When you add the TXT record, paste the hostname and record value that you copied from the Verify Registrant Identity message.

  6. Confirm whether the TXT record takes effect. If the TXT record takes effect, go to the Verify Registrant Identity message and click Verify.

    Important

    Do not close the message when you add the TXT record. Otherwise, the TXT record fails the verification because the system generates a new TXT record.

  7. If the TXT record passes the verification, click Add Subdomain Name. The subdomain name is automatically displayed in the domain name list. Click the subdomain in the list to go to the DNS Settings page. Alibaba Cloud DNS retrieves DNS records of the subdomain from the primary domain.

  8. On the DNS Settings page of the subdomain, obtain the names of the DNS servers that the system assigns to the subdomain. Add two NS records for the primary domain. The NS records point to the DNS servers that Alibaba Cloud DNS assigns to the subdomain.

  9. If the DNS records of the primary domain contain the DNS records of the subdomain, the DNS records of the primary domain may not take effect after the subdomain is hosted. To avoid this issue, you must remove the DNS records of the subdomain from the primary domain and add DNS records for the subdomain on the DNS Settings of the subdomain. If the DNS records of the primary domain do not contain the DNS records of the subdomain, skip this step.

    Important

    You must bind Alibaba Cloud DNS instances of the same edition to the primary domain and subdomain. For example, if you bind a paid instance to the primary domain, you must also bind an instance of the same paid edition to the subdomain. If you bind a paid instance to the primary domain, you must bind an instance of the same paid edition to the subdomain after you add the subdomain, and then you can add NS records for the primary domain.

Scenario 3: Both the primary domain and the subdomain are hosted by Alibaba Cloud DNS, but the subdomain needs to be retrieved because the subdomain is added to another Alibaba Cloud account.

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Authoritative DNS Resolution. On the Authoritative Domain Names tab of the page that appears, click Add Domain Name.

  3. In the Add Domain Name dialog box, enter a subdomain name and click Retrieve Domain Name.

  4. In the Verify Registrant Identity message, copy the hostname and record value.

    Important

    You can copy the hostname and record value but cannot close the message. Otherwise, the TXT record fails the verification because the system generates a new TXT record. After you add the TXT record for the primary domain name, click Verify to verify the TXT record.

  5. After the TXT record passes the verification, the subdomain and its DNS records are automatically retrieved to your current Alibaba Cloud account.

Rules

For more information about the rules of subdomain management, see Subdomain management rules.