This topic provides answers to some commonly 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 instance. IP addresses are composed of digits and can be mapped to domain names for easier management. For example, is a domain name that corresponds to an IP address. DNS resolution resolves a domain name into the corresponding IP address. Therefore, 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 into IP addresses in dotted decimal notation for computer 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 into the IP address where your website is hosted. When you build a website, you must configure DNS resolution. After you must 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 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 map a domain name to an IP address. The following figure shows an A record. In the A record, the host name is the prefix of a domain name. Common domain name prefixes include www and mail. The record value is the IP address of your 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 map the domain names that point to the previous instance to the new ECS instance. However, mapping changes may increase workloads 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 resolve a domain name into another domain name. The CNAME record is applicable to email resolution and CDN resolution.

If you want to use Content Delivery Network (CDN) to accelerate the delivery of the content on your website, you must configure a CNAME record. After you activate Alibaba Cloud Content Delivery Network (CDN) and add a domain name to Alibaba Cloud CDN, it 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 Configure a CNAME record in Alibaba Cloud DNS.

The CNAME is also mapped 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 into an IP address, and a CNAME record resolves a domain name into 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. For more information, see How CDN works.