DNS resolution, slowed down

Welcome to this guide on DNS and IP address resolution. In this article, I will describe in detail how domain names are tied to computer IP addresses via the DNS system without using complicated technical babble that other articles tend to use when describing these types of things. DNS happens so quickly and there are so many steps involved. I always think that the best way to understand something is to slow it down and break it into small pieces. That way, you can look at each piece one by one and get an understanding of how the pieces work and fit together as a unit. Just trying to understand everything at once is very confusing and overwhelming.

What the hell is this DNS thing?

As humans, we identify things by their name. People, countries, buildings, dogs, cats, mountains, all have a name. However, because a computer's tiny little brain can't deal with human words, they have to use numbers instead. This ultimately leads to a massive language barrier being formed between man and machine. Think about it, is a human really going to understand all those ones and zeros their computer is spitting out? To solve this problem, the DNS (Domain Name System) was created. DNS works by taking a memorable, human-readable name, called a domain name, and tying it to an IP address, a series of numbers that uniquely identifies each computer connected to a network such as the internet. DNS is the internet's version of speed dial. When you select a name from the list and press the call button, the person's telephone number is found and automatically dialled. However, loading a website takes a lot more steps than calling a friend. The following list details the steps taken to load this website, seedy.cc.

How DNS works

When you type "seedy.cc" into your browser's address bar and press enter, the following things happen.

  1. Your operating system (Windows, MacOS or Linux) will check its DNS listings to see if it contains the IP address of the seedy.cc web server, the computer where the website lives.
  2. If the IP address is not there, the query is sent to a DNS resolver server. This can be a server that is run by your ISP (Internet Service Provider) or a public one run by Google or Cloudflare. The resolver then checks its list of domain names.
  3. If the IP address is still nowhere to be found, the resolver then asks the root server for help. The root server contains the details of 13 sets of top level domain (TLD) servers. TLD servers exist for all domain extensions including .com, .co.uk, .net, etc. In this case, the root server will contact the .cc server.
  4. The .cc server then checks for and contacts the appropriate name server for the domain name.
  5. The name server looks in its database for the IP address tied to that domain and sends it back to the resolver.
  6. The resolver then stores this information for future reference and sends the IP address to the browser.
  7. Finally, the browser contacts the web server and loads the website.

You may be wondering how the top level domain server knew which name server to contact. Well, when a website owner registers a domain, they have the option to specify a series of name servers which contain IP address information for other types of servers, such as web, mail and file servers. When the name servers are set, the appropriate TLD server (.com, .net, .cc) is contacted and the details of the name server are stored.

Outro

I hope you were able to fully understand everything in this guide. The whole thing is very long and complicated, so I won't be surprised if you struggle to get it at first.