This topic provides answers to some frequently asked questions about Domain Name System (DNS) resolution.

What is DNS resolution?

  • What is DNS resolution?

    After you purchase an Elastic Compute Service (ECS) instance, the system automatically assigns an IP address to the ECS instance. IP addresses are composed of digits and can be resolved to domain names for easier management. For example, www.aliyun.com is a domain name that corresponds to an IP address. DNS resolution resolves a domain name to the corresponding IP address. This way, users can visit your website through its domain name.

    Alibaba Cloud DNS supports DNS resolution. Alibaba Cloud DNS is a secure, efficient, stable, and scalable DNS service. Alibaba Cloud DNS allows enterprises and developers to resolve easy-to-manage domain names to IP addresses in dotted decimal notation for network communications. This way, client requests can be redirected to the corresponding websites or application servers. For more information, see Alibaba Cloud DNS.

  • Why is DNS resolution required?

    External users can visit your website only after the requested domain name is resolved to the IP address where your website is hosted. When you build a website, you must configure DNS resolution. After you purchase an ECS instance, deploy a website, purchase a domain name, apply for an Internet Content Provider (ICP) number, you must also configure DNS resolution.

  • How do I configure DNS resolution?

    Most domain name registrars in mainland China provide their own DNS servers.

What is an A record?

When you configure DNS resolution, you must select a record type. This section provides details about the A record.

An A record is also known as an IP address pointer, and is used to resolve a domain name to an IP address. The following figure shows an A record. In the A record, the hostname is the prefix of a domain name. Common domain name prefixes include www and mail. The record value is the IP address of the web server. A record

You may purchase multiple domain names and map these domain names to the same web server. In this case, you must specify these domain names as subdomain names, and map them to your web server. Second-level and third-level domain names under top-level domain names are called subdomain names.

If you change the ECS instance that hosts your website, you must remap the domain names to the new ECS instance instead of the previous ECS instance. However, mapping changes may increase loads on the ECS instance. In this case, a Canonical Name (CNAME) record is an excellent alternative.

What is a CNAME record?

A CNAME record is also called an alias record, and is used to map a domain name to another domain name. The CNAME record is applicable to email resolution and CDN resolution.

If you want to use a Content Delivery Network (CDN) service to accelerate the delivery of content on your website, you must configure a CNAME record. After you activate Alibaba Cloud CDN and add a domain name to Alibaba Cloud CDN, Alibaba Cloud CDN assigns a CNAME to the domain name. You must map the domain name to the CNAME. This way, requests sent to the domain name can be redirected to CDN nodes and content delivery can be accelerated. For more information, see Add a CNAME record for a domain name.

The CNAME is also resolved to the IP address specified in the A record.

What are the differences between a CNAME record and an A record?

An A record resolves a domain name to an IP address, and a CNAME record maps a domain name to another domain name.

If you want to run a website for an extended period of time, we recommend that you use a CNAME record. A CNAME record can be used to accelerate content delivery and hide the real IP address of your web server to mitigate attacks.

How does a CNAME record work in Alibaba Cloud CDN?

Alibaba Cloud CDN caches content on origin servers to CDN nodes. Users retrieve cached content from the nearest CDN nodes. A CNAME record can be used to map an accelerated domain name to a CNAME. After you configure a CNAME record for a domain name accelerated by Alibaba Cloud CDN, requests sent to the accelerated domain name are redirected to CDN nodes. This way, content delivery is accelerated.