- Published on
Almost Everything About Domain Name System (1)
- Authors
- Name
- hwahyeon
At the request of a client, I terminated their existing domain and connected a new one. In this case, the client's hosting provider, domain registrar, email service provider, and previous web development company were all separate entities. This time, I unified all these elements into a single system as I started a new web development project for this company. While working on the project, I took the opportunity to organize and clarify the domain-related knowledge that had previously been tangled in my mind. So, I decided to write this series.
Through this series, you’ll gain a clear and comprehensive understanding of almost everything related to domains.
The table of contents for this series is as follows:
- Part 1: Covers domains, TLDs, registries, the process of finding a domain in a browser, and more.
- Part 2: Discusses A records, CNAME records, NS records, name servers, domain resellers, hosting providers, and more.
- Part 3: Explores caching, MX records, resolvers, and more.
Table of Contents
- What is the Domain System?
- What is a Top-Level Domain?
- What is a Registry?
- How the Domain System Works
- Operating a Registry
- Purchasing a Domain
- How a Browser Works
What is the Domain System?
The domain system is simple. IP addresses are made up of numbers, which are difficult to remember. The domain system converts these IP addresses into readable text. For example, when you type google.com
, your browser uses the domain system to find the corresponding IP address and establish a connection. For reference, one of the IP addresses for Google's main page is 142.250.190.78
. Isn't it much easier to remember google.com
than a string of numbers?
In summary, google.com
is a domain, and the system that makes it work is the domain system.
What is a Top-Level Domain?
A Top-Level Domain (TLD) is the last part of an internet domain name. For example, in google.com
, the top-level domain is .com
.
Types of TLDs
Top-level domains are primarily divided into two categories:
Generic Top-Level Domains (gTLDs)
.com
: Primarily used for commercial websites.org
: Often used by non-profit organizations.net
: Commonly used for network-related websites.edu
: Reserved for educational institutions.gov
: Reserved for U.S. government entities Generic TLDs are often open for anyone to register, but some are restricted to specific purposes.
Country Code Top-Level Domains (ccTLDs)
Country code TLDs represent specific countries or regions and are primarily used within those areas. For example:
.de
: Germany.gr
: Greece
Country codes consist of two letters and are assigned according to international standards.
What is a Registry?
A Registry is an organization that manages a specific Top-Level Domain (TLD). For example, the .com
registry is managed by a company called Verisign, which oversees all domains under .com
, such as google.com
and amazon.com
. In other words, Verisign holds the actual IP addresses of .com
domains, and the domain system operates based on this information.
Can all governments be considered registries?
The answer is "No." While ccTLDs are also part of the Top-Level Domain (TLD) system, not all governments directly manage their respective ccTLDs. In many cases, governments delegate the registry role to an authorized organization or company.
Examples of Country Code Top-Level Domain Registries
Germany (.de)
Germany's
.de
domain is managed by a non-profit organization called DENIC. Although the German government does not directly operate it, DENIC functions independently under government regulations.South Korea (.kr)
South Korea's ccTLD,
.kr
, is managed by the Korea Internet & Security Agency (KISA). While KISA is a government agency, ccTLD management is generally carried out in an independent manner.
How the Domain System Works
The domain system consists of millions of domains. If a browser had to search through all these domains to find google.com
, it would take a very long time. However, the domain system uses a hierarchical structure of servers to process these requests efficiently. Each server manages specific domain information, allowing it to quickly provide the requested data.
Domain Hierarchy
The domain system's hierarchy is as follows:
- Root Name Server: Located at the top level, it identifies which Top-Level Domain (TLD) a domain belongs to.
- TLD Name Server: Manages TLDs such as
.com
and.net
and provides the location of specific domains within those groups. - Authoritative Name Server: Stores the IP address of a specific domain and ultimately returns the requested IP address to the browser.
google.com
Example: Accessing When you access google.com
, the domain system goes through the following steps.
Root Name Server
The browser first queries the Root Name Server to determine which group (e.g.,
.com
,.net
)google.com
belongs to. The root server responds thatgoogle.com
is part of the.com
group.TLD Name Server
The browser then queries the TLD Name Server responsible for
.com
domains for detailed information aboutgoogle.com
. The TLD server responds with the location of the Authoritative Name Server forgoogle.com
.Authoritative Name Server
Finally, the browser contacts the Authoritative Name Server for
google.com
and requests its IP address. This server provides the IP address, allowing the browser to connect to Google's server. For example,.com
domains are managed by Verisign, so the authoritative name server forgoogle.com
is part of Verisign's infrastructure.
This system processes requests step-by-step, allowing the browser to quickly find the information it needs to connect to the correct server for google.com
.
Operating a Registry
Can an individual operate a registry? For example, imagine wanting to create a new registry for .awesome
. To do so, you would need to apply to ICANN (Internet Corporation for Assigned Names and Numbers). ICANN is the organization responsible for managing the policies and registration procedures of Top-Level Domains (TLDs). To operate a registry, you must demonstrate the infrastructure, technical capability, and customer management skills necessary for domain operations.
The application process is not only extremely expensive but is also limited to specific periods designated by ICANN. Furthermore, obtaining approval can take several years.
Once you complete this entire process and register .awesome
as a registry, you gain the authority to manage and operate domains under that TLD.
Purchasing a Domain
As explained earlier, a Registry is an organization that manages specific TLDs (e.g., .com
, .org
, .net
) and typically does not sell domains directly. To purchase a domain, you need to go through a Reseller such as GoDaddy, Namecheap, or Whois, rather than registries like Verisign. Resellers handle domain registration and renewal, payments, and technical support, making it easy for consumers to acquire the domains they want. (We'll take a closer look at this in the next post along with hosting providers.)
How a Browser Works
When you type google.com
into a browser, the browser first checks if the IP address for the domain is stored in its local cache. The local cache is a space where previously resolved domain information is saved, helping to reduce unnecessary requests and allowing faster access to websites.
Cache Lookup Order
The local cache is checked in the following order:
- Browser Cache: Stores domain information from previous visits within the browser.
- Operating System Cache: The DNS cache managed at the OS level.
If the IP address is found in the local cache, the browser directly connects to the corresponding server. This means the browser does not need to query external servers if the information is already stored locally. (We will cover cache-related details later.)
What Happens If the Local Cache Misses?
If no information is found in the local cache, the browser sends a query to an external DNS server. Most Internet Service Providers (ISPs) provide their own DNS servers, which cache frequently requested domains and their corresponding IP addresses for faster processing. (While users typically use their ISP's DNS servers, they can also configure public DNS servers like Google DNS (8.8.8.8
) or Cloudflare DNS (1.1.1.1
). These servers also cache frequently requested domains, and the cached information is updated based on a setting called TTL (Time To Live). Once the TTL expires, the information is refreshed by querying higher-level DNS servers. We will also explore TTL in more detail later.)
If the external DNS server cannot resolve the query, the browser follows the hierarchical structure of the Domain Name System (DNS) described earlier and proceeds through the following steps:
- Root Name Server: Identifies which TLD (e.g.,
.com
,.net
) the domain belongs to. - TLD Name Server: Provides the location of the authoritative name server for the domain within the TLD.
- Authoritative Name Server: Finally, returns the IP address of the domain.
Using the IP address obtained from the authoritative name server, the browser connects to Google's server.