Updated on 2025-08-20 GMT+08:00

Product Concepts

Domain Name Hierarchy

The domain name resolution involves a hierarchical structure and often uses recursive queries.

The following uses example.com as an example to describe the structure and levels of a domain.

  • Root domain

    A period (.) is the designation for the root domain.

    A fully qualified domain name (FQDN) ends with a period (example.com.). When you enter a domain name (example.com) in the browser, the DNS system will automatically add a period in the end.

    Root domain names are resolved by root name servers that hold the addresses of top-level domain servers.

  • Top-level domain

    Below the root domain are top-level domains, which are categorized into two types:

    • Generic top-level domain (gTLD), such as .com, .net, .org, and .top
    • Country code top-level domain (ccTLD), such as .cn, .uk, and .de

    Top-level domains are resolved by top-level domain servers that hold the addresses of second-level DNS servers. For example, the top-level domain server of .com saves the addresses of all DNS servers of second-level domains that end with .com.

  • Second-level domain

    Second-level domains (such as example.com) are subdomains of top-level domains and are resolved by second-level DNS servers, which provide authoritative domain name resolution services.

    For example, if you purchase example.com from a domain name registrar and set a DNS server for the domain name, the DNS server will provide authoritative resolution for example.com, and its address will be recorded by all top-level domain servers.

    If you host domain names on the Huawei Cloud DNS service, authoritative DNS servers will provide authoritative resolution services for your domain names.

  • Subdomain

    Second-level domains can be further divided into subdomains (such as www.example.com) to indicate specific servers or services.

DNS Hierarchy

DNS also operates through a hierarchical structure. At the top is the root name server, followed by top-level domain servers, authoritative servers, local DNS and cache servers. Each level plays a specific role in the resolution process, working together for domain name resolution. This structure ensures efficient, reliable, and scalable domain name resolution.

  • Root name server (Root server)

    Root name servers are at the top of the DNS hierarchy and direct queries for records to an appropriate top-level domain server. When a local DNS server does not have the IP address cached for a domain name, it will query a root name server, aiming to obtain the IP address.

  • Top-level domain (TLD) server (TLD server)

    TLD servers handle queries related to specific generic top-level domains such as .com, .org, and .net, and country code top-level domains, such as .cn and .us.

    Each top-level domain has its own set of servers that manage the DNS entries for domains within that top-level domain. For example, when a client wants to access www.example.com, the local DNS server sends the request to the top-level domain server of .com. Then, the top-level domain server of .com returns the address of the authoritative DNS server of the second-level domain example.com.

  • Authoritative server (NS server)

    Authoritative DNS servers are the final word on the mapping between specific domain names and their associated IP addresses. For example, the authoritative DNS server of example.com will return the IP address mapped to the subdomain www.example.com.

  • Local DNS server (Local DNS)

    Local DNS servers are the DNS servers that user devices (like phones and computers) utilize to connect to the internet. They are often provided by Internet Service Providers (ISPs) or organizations and handle recursive DNS requests from clients. When a user requests a domain name, the local DNS server initiates a recursive query to find the corresponding IP address. It searches layer by layer through the DNS hierarchy until it finds the authoritative server that holds the correct IP address. Once found, the local server caches this information to speed up future requests for the same domain.

    You can also choose a public DNS server, for example, 114.114.114.114 and 8.8.8.8, as your local DNS server.

DNS Resolution Process

Figure 1 shows the process for accessing a website using the domain name www.example.com.

Figure 1 Domain name resolution
  1. An end user enters www.example.com in the address box of a browser.
  2. The query for www.example.com is routed to the local DNS server.

    Local DNS servers are usually provided by the Internet service provider to cache domain name information and perform recursive lookup.

  3. If the local DNS server does not find any records in the cache, it routes the request for www.example.com to the root name server.
  4. The root name server returns the address of the top-level domain server of .com to the local DNS server.
  5. The local DNS server sends the request to the top-level domain server of .com.
  6. The top-level domain server of .com returns the address of the authoritative DNS server which provides authoritative records for example.com.
  7. The local DNS server sends the request to the authoritative DNS server of example.com.

    If you have hosted www.example.com on the DNS service and configured Huawei Cloud DNS name servers, these name servers will provide authoritative DNS for the domain name.

  8. The authoritative DNS server returns the IP address mapped to www.example.com to the local DNS server.
  9. The local DNS server returns the IP address to the web browser.
  10. The web browser accesses the web server with the IP address.
  11. The web server returns the web page to the browser.
  12. The end user views the web page using the browser.

Glossary

Project

A project is used to group and isolate resources, including compute, storage, and networking resources. A project can be a department or a project team.

Multiple projects can be created under one account.

Public zones are global resources, while private zones and PTR records are regional resources. Private zones and PTR records are isolated and managed based on projects. You need to create, query, and configure private zones or PTR records in specific regions and projects.

Region and AZ

For details, see "Region and AZ" in the Domain Name Service FAQs.