Help Center> Domain Name Service> FAQs> Public Zones> How Is a Domain Name Resolved When a Record Set Has Multiple Values?
Updated on 2022-07-14 GMT+08:00

How Is a Domain Name Resolved When a Record Set Has Multiple Values?

Only A and AAAA record sets can have multiple values.

If an A or AAAA record set has multiple values, all IP addresses are returned for each query in a random sequence, and the first IP address is used.

The process how a domain name is resolved is as follows:

  1. A visitor enters a domain name in a browser, and the request for the DNS query is sent to the local DNS server.
  2. The local DNS server forwards the request to the authoritative DNS server.
  3. The authoritative DNS server returns all IP addresses to the local DNS server in a random sequence.
  4. The local DNS server returns all IP addresses to the browser.
  5. The browser randomly accesses one of the IP addresses. Generally, the first IP address is used.

Statistically, the probability of returning each IP address is approximately the same.

The following is an example how IP addresses are returned for a domain name. You have a website deployed on three servers. The domain name of your website is example.com, and the IP addresses of the three servers are 192.168.1.1, 192.168.1.2, and 192.168.1.3.

An A record set is added to the domain name, with the Value field set to the three IP addresses.

Table 1 describes the resolution results returned when different visitors access the website.

Table 1 Example resolution results

Visitor

IP Addresses Returned by the Local DNS Server

IP Address Accessed by the Browser

Visitor A

192.168.1.1

192.168.1.2

192.168.1.3

192.168.1.1

Visitor B

192.168.1.2

192.168.1.1

192.168.1.3

192.168.1.2

Visitor C

192.168.1.3

192.168.1.1

192.168.1.2

192.168.1.3

Public Zones FAQs

more