DEV Community

Cover image for DNS -The gatekeeper 24/7 of the internet - Part 1
Luke
Luke

Posted on • Updated on

DNS -The gatekeeper 24/7 of the internet - Part 1

The first time I learned about web development, I had so many questions to ask like:

  • What happens behind the scenes after I type the URL and press enter?
  • Why in ULRs have too many suffixes diff (.com, .gov, .edu, etc)?
  • And how can web browsers find the right website in millions to trillion websites?

With the help of Mr.IKnowEveryThing aka Google, I met the gatekeeper - DNS aka Domain Name System, he/she (or maybe it 👀) answered every my question above

What is DNS?

For an easy explanation, think of DNS as a phone book. Unlike a regular phone book that stores names and phone numbers, DNS stores both the domain name and the corresponding IP address.

Why call DNS the gatekeeper?

DNS Gatekeeper

Gatekeeper, the name talks the meaning, every request you send or response you receive must go through DNS first. But the action DNS makes with request and with response is diff.

With request, DNS becomes a translator, it will translate human-friendly domain names (example.com) into numeric IP addresses (192.0.2.1). With this, it guides your request through a hierarchy of servers, ensuring you reach the right place.

Web Process

With response, DNS becomes security guys, it will ensure the response from legit servers only. On another hand, with some security steps, DNS helps prevent unauthorized alterations

Where is DNS?

In fact, DNS will be stored on a server in the data center of your ISP (Internet Service Provider). Means it appears around the world

DNS location

Summary

That's it, you have met the gatekeeper of the internet, and you know why it works 24/7. If it retire or sick, we need access the website by magic number - IP address, not mention security problem yet 😂

I will talk about how DNS works in the next part.

Happy Coding!

Top comments (0)