What is DNS and why you use it every day

What is DNS and why you use it every day

Photo by NASA on Unsplash

Play this article

DNS is a crucial part of the Internet, but what is DNS?

DNS stands for Domain Name System and acts kind of like a phonebook.

Every time you click on a link or type in a domain name, DNS translates that domain name to the IP address of a server hosting that website.

For example, say you visit google.com, your computer asks a DNS server "what IP address is google.com pointing to?" and the DNS server will respond with an IP address like 142.250.178.14 (one of Google's).

That IP address may be a web server hosting a website, a mail server if you're sending an email or a game server if you're playing a game.

Behind the Scenes

Firstly, your device will check its local DNS cache to see if it knows the IP address (fastest method).

If that doesn't know, then it will ask a DNS resolver configured by your device or router, which might be hosted by your ISP (Internet Service Provider).

That DNS resolver may have the IP address cached, or it may need to ask one of the nameservers (NS) on the Internet.

It will try one of the root nameservers on the Internet, controlled by the IANA (Internet Assigned Numbers Authority).

Then, it will try one of the TLD (Top Level Domain) nameservers. If you request google.com, then the nameserver for the .com TLD will be used.

Finally, it will try the host's nameserver, Google's in this instance.

DNS Request Example

Image by Catchpoint.

Public DNS Services

If you want to change your DNS resolver, say if you don't like the idea of using your ISP's, then you can do so by changing the DNS settings of your device or router.

There are many public DNS services available for free such as the following...

  • 1.1.1.1 by Cloudflare

  • Google Public DNS

  • Quad9

References

catchpoint.com/blog/domain-name-to-ip-address

https://1.1.1.1

developers.google.com/speed/public-dns/docs..

quad9.net