Introduction to subdomains
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.
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
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.
Allow users to access your business by using a subdomain.
For example, you can configure DNS records for aliyun.com and www.aliyun.com to ensure that users can access your business by using both domain names.
Configure a subdomain
Determine the subdomain you want to configure.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.
Log on to the Alibaba Cloud DNS console.
On the Manage DNS page, click the domain name.
On the DNS Settings page, click Add Record.
Type: Select A.
Host: Enter www to create a record for www.dns-example.com and enter @ to create a record for dns-example.com.
ISP Line: Select Default.
Value: Enter the IP address of your web server. If you are not sure about the IP address, contact your web server provider or server space provider.
TTL: Select 10 minute(s).