All Products
Search
Document Center

Alibaba Cloud DNS:How can I configure a subdomain?

Last Updated:Dec 03, 2024

What is a subdomain?

A domain name can be divided into multiple levels of subdomains. Based on the levels, domain names can be classified into the following categories: top-level domains (TLDs), second-level domains, third-level domains, and so on.

domain

Example:

  • com is a TLD.

  • aliyun.com is a second-level domain, which is a subdomain of the TLD.

  • example.aliyun.com is a third-level domain, which is a subdomain of the second-level domain.

  • www.example.aliyun.com is a subdomain of the third-level domain.

Scenarios

  1. Divide a domain name into different subdomains. Then, you can use the subdomains to provide different services.

For example, if you have registered a domain name aliyun.com, you can use its subdomain api.aliyun.com for the API development service and pay.aliyun.com for the payment system.

  1. Allow users to access your business by using a subdomain.

For example, if you have registered a domain name aliyun.com, you can configure DNS records for api.aliyun.com and www.aliyun.com to ensure that users can access your business by using both subdomains.

Configure a DNS record for a subdomain

  1. For example, you have registered a domain name dns-example.com, and you want users to access your website by using both www.dns-example.com and dns-example.com.

  2. Log on to the Alibaba Cloud DNS console.

  3. On the Authoritative DNS Resolution page, click the Authoritative Domain Names tab. Find the domain name for which you want to add an A record to click DNS Settings in the Actions column.

  4. On the DNS Settings tab, click Add DNS Record.

  • Record Type: Select A.

  • Hostname: Enter the prefix of the subdomain name or an at sign (@) as required. If you want to create an A record for the subdomain namewww.dns-example.com, enter www. If you want to create an A record for the subdomain namedns-example.com, enter @ .

  • DNS Request Source: Select Default.

  • Record Value: Enter the IP address to which the domain name is mapped. If you do not know the address, contact your service provider or website server.

  • TTL: Enter a time to live (TTL) value for the A record. Alibaba Cloud DNS Free Edition and Alibaba Cloud DNS Personal Edition support the minimum TTL value of 10 minutes. Alibaba Cloud DNS Enterprise Standard Edition supports the minimum TTL value of 1 minute. Alibaba Cloud DNS Enterprise Ultimate Edition supports the minimum TTL value of 1 second.

    Note

    Theoretically, a smaller TTL value indicates that record updates take effect more quickly. If some Internet service providers (ISPs) adjust the TTL values of DNS records cached in their local DNS servers, how long the DNS records can be cached in the local DNS servers is determined by the TTL values configured for the local DNS servers.

  1. You can use Network Detect Tool to detect whether the DNS records for a domain name take effect.