All Products
Search
Document Center

Alibaba Cloud DNS:Manage subdomains

Last Updated:Jan 18, 2024

Overview

Alibaba Cloud DNS provides independent Domain Name System (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 sections.

Terms

Term

Description

subdomain name

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

subdomain

If aliyun.com is a 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. The DNS servers that contain the DNS records of your primary domain are hosted by a third-party DNS service. For specific reasons, all DNS records cannot be migrated 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 their 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 such 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. On the Authoritative Domain Names tab of the Domain Name Resolution page, click Add Domain Name.

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

    image.png

  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 record value for verifying the TXT record is valid for one day. You can verify the TXT record for up to three times. If all 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.

    域名持有者身份验证

  5. Return to the Domain Name Resolution page, find the primary domain 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

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

  7. After the TXT record passes the verification, click Add Domain Name. The subdomain is automatically displayed on the Domain Name Resolution page. Click the subdomain to go to the DNS Settings page. On the DNS Settings page, add DNS records.

    image.png

  8. 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

    image.png

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. On the Authoritative Domain Names tab of the Domain Name Resolution page, 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 to pass 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 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. Check 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 to pass the verification because the system generates a new TXT record.

  7. After the TXT record passes the verification, click Add Domain Name. The subdomain name is automatically displayed on the Domain Name Resolution page. Click the subdomain to go to the DNS Settings page. Alibaba Cloud DNS retrieves the DNS records of the subdomain from the primary domain.

  8. On the DNS Settings page of the subdomain, copy the names of DNS servers assigned by Alibaba Cloud DNS. 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 subdomain are added under the primary domain, the DNS records under the primary domain may not take effect after the subdomain is hosted. To prevent 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 page of the subdomain. If no DNS records of the subdomain are added under the primary domain, 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 a paid instance to the subdomain after you add the subdomain. 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. On the Authoritative Domain Names tab of the Domain Name Resolution page, 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.

    Warning

    Do not close the message after you copy the hostname and record value. Otherwise, the TXT record fails to pass 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. After the primary domain name is verified, click Add Domain Name.

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

Scenario 4: Both the primary domain and the subdomain are hosted by Alibaba Cloud DNS and belong to the same account.

  1. Log on to the Alibaba Cloud DNS console.

  2. On the Authoritative Domain Names tab of the Domain Name Resolution page, 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.

  5. Return to the Domain Name Resolution page, find the primary domain 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. Check whether the TXT record takes effect. If the TXT record takes effect, go to the Verify Registrant Identity message and click Verify. After the TXT record passes the verification, click Add Domain Name.

    Warning

    If the subdomain is separately hosted, bind the subdomain to an Alibaba Cloud DNS instance of the same edition as that bound to the primary domain. For example, the Alibaba Cloud DNS instances that are bound to the subdomain and primary domain are both of the free edition or a paid edition.

Rules

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

FAQ

For more information, see FAQ about features of Alibaba Cloud DNS.