All Products
Search
Document Center

SubDomain management

Last Updated: Aug 27, 2020

Overview

Alibaba Cloud DNS provides DNS hosting and domain name resolution services for subdomains, such as second-level domains and third-level domains.

The procedure of adding a subdomain is as follows:

a. Add a subdomain.

b. Verify domain ownership by using a TXT record.

c. Add DNS records to the subdomain.

d. Add NS records to the primary domain.

For more information, see Procedure in this topic.


Terms

Term Description
subdomain name For example, www.aliyun.com is a subdomain name of aliyun.com.
subdomain For example, if aliyun.com is the primary domain, www.aliyun.com is a second-level domain of the primary domain and test.www.aliyun.com is a 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 manage subdomains, such as second-level domains and third-level domains. You can manage DNS records of subdomains.

Scenarios

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

  1. Your primary domain DNS server is hosted by a third-party DNS provider. For specific reasons, it is impossible to migrate all DNS records to Alibaba Cloud DNS. To use your subdomains, you need to migrate them to Alibaba Cloud DNS.
  2. Primary domains of multinational companies or large groups are generally managed by headquarters, while branch offices need to apply for subdomains for separate management.
  3. Government-owned enterprises and financial institutions generally use self-created DNS servers, but the cost of use and maintenance is high. Users can authorize Alibaba Cloud DNS to separately manage their subdomains.

Procedure

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

1. Log on to the Alibaba Cloud DNS console

2. In the left-side navigation pane, click Manage DNS. On the Domains tab, click Add Domain Name.


add domain

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


TXT验证

4. In the Verify Domain Name Owner dialog box that appears, copy the host record and TXT record.

Note: In the Verify Domain Name Owner dialog box, you can copy the host record and TXT record. In this scenario, you can close the dialog box if you want to verify the TXT record at a later time. The value of the TXT record is valid for one day. After you add the TXT record to the primary domain, you can click Verify to verify the TXT record.

TXT验证记录值

5. On the DNS Settings page of the primary domain, add the TXT record by using the host record and TXT record that you copied from the Verify Domain Name Owner dialog box.


Record type Domain name Record value
TXT alidnscheck.dns-example.com 60affd31e1a3420e92a32aeb4d8b4406


6. Confirm that the TXT record is in effect, go to the Verify Domain Name Owner dialog box, and click Verify.


TXT验证按钮

7. The TXT record is verified. Click Verified. The subdomain is displayed in the domain name list. Click the subdomain in the list to go to the DNS Settings page. On the page that appears, click Add Record to add DNS records to the subdomain.


添加解析记录

8. Add two NS records to the primary domain. These records point to DNS server addresses that Alibaba Cloud DNS assigns to the subdomain.

Note: We recommend that you use the DNS server information displayed in the Alibaba Cloud DNS console when you add NS records.

Record type Domain name Record value
NS znm.dns-example.com ns1.alidns.com
NS znm.dns-example.com ns2.alidns.com


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

1. Log on to the Alibaba Cloud DNS console

2. In the left-side navigation pane, click Manage DNS. On the Domains tab, click Add Domain Name.

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


TXT验证

4. In the Verify Domain Name Owner dialog box that appears, copy the host record and TXT record.

Note: In the Verify Domain Name Owner dialog box, you can copy the host record and TXT record. We recommend that you keep the Verify Domain Name Owner dialog box open in this step. Otherwise, the TXT verification fails because the system generates a new TXT record. After you add the TXT record to the primary domain, you can click Verify to verify the TXT record.
TXT验证02

5. On the DNS Settings page of the primary domain, add the TXT record by using the host record and TXT record that you copied from the Verify Domain Name Owner dialog box.


添加TXT记录

6. Confirm that the TXT record is in effect, go to the Verify Domain Name Owner dialog box, and click Verify.

Note: We recommend that you keep the Verify Domain Name Owner dialog box open in this step. Otherwise, the TXT verification fails because the system generates a new TXT record.
TXT验证

7. The TXT record is verified. Click Verified. The subdomain is 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 assigned DNS server address. Add two NS records to the primary domain. These records point to DNS server addresses that Alibaba Cloud DNS assigns to the subdomain.


NS提醒
NS授权

9. If the subdomain is part of the primary domain, DNS records of the subdomain may not take effect. You need to remove DNS records of the subdomain from the DNS server that hosts the primary domain. If the subdomain is not part of the primary domain, skip this step.

记录删除

Note: You must use the same edition of Alibaba Cloud DNS for the primary domain and the subdomain. For example, if you use the paid edition for the primary domain, you must bind the subdomain to the paid edition. If you use the paid edition for the primary domain, after you add the subdomain, you must bind the subdomain to the paid edition before adding NS records to 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 another account has added DNS records to the subdomain.

1. Log on to the Alibaba Cloud DNS console

2. In the left-side navigation pane, click Manage DNS. On the Domains tab, click Add Domain Name.

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

找回域名

4. In the Verify Domain Name Owner dialog box that appears, copy the host record and TXT record.

Note: In the Verify Domain Name Owner dialog box, you can copy the host record and TXT record. We recommend that you keep the Verify Domain Name Owner dialog box open in this step. Otherwise, the TXT verification fails because the system generates a new TXT record. After you add the TXT record to the primary domain, you can click Verify to verify the TXT record.

持有者身份验证

6. After the domain name owner is verified, the subdomain and its DNS records are automatically added to the account that initiated the retrieval.

成功找回域名

Limits

For more information, see Limits on subdomain management.