All Products
Search
Document Center

Configure a subdomain

Last Updated: Aug 21, 2020

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.

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, 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

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

  1. Log on to the Alibaba Cloud DNS console.

  2. On the Manage DNS page, click the domain name.

  3. 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).

add-record

  1. Use the DNS test tool to check whether the DNS records take effect.