How the Domain Name System Works?
- Ilakk Manoharan
- Dec 5, 2022
- 2 min read
Updated: Dec 5, 2022
The Domain Name System (DNS) is a hierarchical decentralized naming system for computers, services, or other resources connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most importantly, it translates more readily memorized domain names to the numerical IP addresses needed for locating and identifying computer services and devices with the underlying network protocols.
What are the building blocks of Domain Name System?
The building blocks of the Domain Name System (DNS) include domain names, DNS servers, and DNS records.
Domain names are the human-readable names that are associated with IP addresses and used to access websites and other resources on the Internet. For example, the domain name "google.com" is used to access the Google search engine.
DNS servers are the computers that store and manage the DNS records that map domain names to IP addresses. These servers are organized in a hierarchical structure, with root DNS servers at the top and individual domain name servers at the lower levels.
DNS records are the entries in the databases maintained by DNS servers. Each DNS record contains information about a specific domain name, such as its associated IP address, and is used by DNS servers to resolve domain names to IP addresses and direct users to the correct website or other online resource.
Explain the high-level flow of the working of DNS:
The Domain Name System (DNS) works by translating domain names into numerical IP addresses that are used to locate and identify resources on the Internet. When a user wants to access a website or other online resource, their device sends a request to a DNS server to look up the IP address associated with the domain name.
Here is a high-level overview of the flow of this process:
A user types a domain name into their web browser or clicks on a link to a website.
The user's device sends a request to a DNS resolver, which is typically operated by the user's internet service provider (ISP).
The DNS resolver checks its local cache to see if it has the IP address associated with the domain name. If it does, it sends the IP address back to the user's device.
If the DNS resolver does not have the IP address in its cache, it sends a request to a root DNS server to obtain the IP address.
The root DNS server responds with the IP address of a top-level domain (TLD) DNS server that is responsible for the domain name's TLD (e.g., ".com" or ".org").
The DNS resolver sends a request to the TLD DNS server to obtain the IP address of the specific domain name.
The TLD DNS server responds with the IP address of the domain name's authoritative DNS server, which is responsible for managing the DNS records for that domain name.
The DNS resolver sends a request to the authoritative DNS server to obtain the IP address for the domain name.
The authoritative DNS server responds with the IP address associated with the domain name.
The DNS resolver sends the IP address back to the user's device, which uses it to establish a connection to the website or other online resource.
The user's device can now access the website or other online resource.
Comments