Skip to main content

Command Palette

Search for a command to run...

How DNS Resolution Works

Updated
2 min read
  1. What is DNS

DNS is basically phonebook of internet .

Anology

DNS is like the internet's phonebook. Just as we don't memorize phone numbers but save them under names, DNS converts domain names into IP addresses.

Every website have an IP address which is actually location where website is located at the server.

Same things happen in internet . When we do search something then we search by writing its domain name on the browser . But server understand only IP address . So here Role of DNS comes .

DNS (Domain Name System ) is a system which convert domain name of website into IP address where website is located.

Example

  • When we type google.com, the DNS translates it into its IP address 142.250.195.14

  • The browser sends a request to this IP address.

  • The Google server responds by sending HTML, CSS, JS, and images back to the browser.

  • Finally, the browser displays the Google webpage.

1 ) Why name resolution exists ?

Name resolution is a process of converting domain name into it’s actual network address (IP address).

Name resolution exist so that user and machine can work in its own language.

What is the 'dig' command

dig is Domain Information Groper which is command-line tool from that we can direct ask question or talk to DNS and DNS response.

dig is used for multiple things:

  • For troubleshooting

  • To see DNS records

  • To get fast and accurate DNS responses

Understanding 'dig NS and root name servers

dig ns tells which server has authority of particular domain where root name sever

Understanding 'dig com NS and TLD name servers

Understanding dig google.com NS and authoritative name servers

Understanding 'dig google.com' and the full DNS resolution flow

Suggestions

  1. Start with a brief explanation of DNS as the internet's phonebook

  2. Introduce 'dig' as a diagnostic tool to inspect DNS resolution

  3. Explain how DNS resolution happens in layers: root TLD authoritative

  4. Walk through each dig command in order to build a mental model

  5. Explain what NS records represent and why they matter

  6. Highlight how recursive resolvers use this information behind the scenes

  7. Connect the output of 'dig google.com' to real-world browser requests

  8. Keep explanations practical and system-design oriented

Diagram Ideas

  1. DNS hierarchy: Root TLD Authoritative servers

  2. Step-by-step DNS resolution flow for 'google.com`

  3. Recursive resolver interaction with name servers

  4. Mapping dig` commands to DNS lookup stages