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:
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.
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.
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.
Log on to the Alibaba Cloud DNS console.
On the Authoritative Domain Names tab of the Domain Name Resolution page, click Add Domain Name.
In the Add Domain Name dialog box, enter a subdomain name and click Verify TXT Record.
In the Verify Registrant Identity message, copy the hostname and record value.
ImportantAfter 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.
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
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. 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.
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.
ImportantWhen 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.
Log on to the Alibaba Cloud DNS console.
On the Authoritative Domain Names tab of the Domain Name Resolution page, click Add Domain Name.
In the Add Domain Name dialog box, enter a subdomain name and click Verify TXT Record.
In the Verify Registrant Identity message, copy the hostname and record value.
ImportantDo 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.
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.
Check whether the TXT record takes effect. If the TXT record takes effect, go to the Verify Registrant Identity message and click Verify.
ImportantDo 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.
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.
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.
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.
ImportantYou 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.
Log on to the Alibaba Cloud DNS console.
On the Authoritative Domain Names tab of the Domain Name Resolution page, click Add Domain Name.
In the Add Domain Name dialog box, enter a subdomain name and click Retrieve Domain Name.
In the Verify Registrant Identity message, copy the hostname and record value.
WarningDo 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.
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.
Log on to the Alibaba Cloud DNS console.
On the Authoritative Domain Names tab of the Domain Name Resolution page, click Add Domain Name.
In the Add Domain Name dialog box, enter a subdomain name and click Verify TXT Record.
In the Verify Registrant Identity message, copy the hostname and record value.
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.
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.
WarningIf 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.