DEV Community

Palak Hirave
Palak Hirave

Posted on

Domain Name System DNS

It helps us find an IP adress for a given name(eg. www.dev.to)

  • Domain Name - A readable address like www.example.com that people can easily remember
  • IP Address - A numerical label (e.g., 93.184.216.34)

It helps us so that rather than remebering a series of numbers, we can simply type in the name of the website we want and have it convert that into the IP address.

DNS Hierarchy

Root servers - top of the hierarchy
Top-Level Domains (TLDs) - eg. .com, .to, .org, .net or country codes like .uk and .de
Second-Level Domains - example in example.com or dev in dev.com
Subdomains/Hostname - eg. www in www.example.com or accounts in accounts.google.com

https://www.example.com/home.html .

https - Scheme
www - Subdomain
example - Second-Level Domain
.com - TLD
home.html - Page Name
. - Root

DNS Resolution Process (Domain Translation)
Step 1 - We type www.example.com into our browser.

Step 2 - Our computer checks its local DNS cache (a small storage area) to see if it already knows the IP address.

Step 3 - If not found locally, it queries a recursive DNS server. This is often provided by our Internet Service Provider or a third-party DNS service like Google DNS.

Step 4 - The recursive DNS server contacts a root server, which points it to the appropriate TLD name server (such as the .com domains, for instance).

Step 5 - The TLD name server directs the query to the authoritative name server for example.com.

Step 6 - The authoritative name server responds with the IP address for www.example.com.

Step 7 - The recursive server returns this IP address to your computer, which can then connect to the website’s server directly.

DNSs are useful as it enables us to just type in the website we want rather than trying to remember a string of IP addresses. The DNS will automatically find and translate the domain name into the correct IP address.

Top comments (0)