What is DNS?
DNS or Domain name system is one of the core technologies of Internet. It’s as old as Internet itself. Almost every Internet user uses it on daily basis without knowing about it. Knowing a little bit more about it can help improve your privacy, security and overall Internet experience. Before we talk about DNS, let’s first understand IP addresses and how they relate to DNS.
IP Addresses
IP Addresses are numeric addresses assigned to identify every device on the Internet. It’s using these IP addresses that two devices can talk to each other on the Internet. When you are trying to access a particular website you can access it by specifying IP address of the remote server in your browser. For example, 142.250.72.14 is IP address of Google. Try accessing it using that IP! Every website server will have unique IP on the Internet. Remembering a IP is tedious and remembering 1000s of them is impossible so this is where DNS comes in picture.
DNS
DNS allows us to access web resource without remembering its IP. There are DNS servers spread all over the world which maintain domain to IP mapping for every website. Your ISP has its own DNS servers. When you are requesting google.com your browser first connects to DNS server, gets it’s IP address and then connects to Google server and loads the website.
You might be wondering how does your browser know about IP address of DNS server? This information is shared by your router or network provider when your device connects to the network. Most of the times the DNS servers are set to the ones provided by ISP. Other well know DNS servers are 8.8.8.8 & 8.8.4.4 owned by Google.
Rough sequence diagram of how website is looked up using DNS
sequenceDiagram
autonumber
Client ->> Router: What is DNS server?
Router ->> Client: DNS server is 8.8.8.8
Client ->> 8.8.8.8: What is IP of google.com?
8.8.8.8 ->> Client: google.com is 142.250.72.14
Client ->> 142.250.72.14: website request
142.250.72.14 ->> Client: HTML webpage
In future post, we will talk about how you can improve your privacy on the Internet using DNS. Until then subscribe to RSS feed to stay updated.