Have you ever wondered exactly how your web browser finds the server for a domain name when you enter an address into your web browser? As humans we prefer using memorable domain names like google.com or amazon.com (and there are millions of these). However domain names in text form are not that well suited to computers, network addressing using numerical IP addresses is much more effective.
DNS or the domain name system is the networking tool that matches a domain name to the IP address that corresponds to it. DNS is what helps your web browser find the IP address for the web server that hosts the domain name. In essence, every time you enter a web address into your browser your web server contacts a DNS server to request the IP address for the domain name. By the way, it’s worth noting that every device connected to the internet has an IP address.
Understanding what a DNS server does
It’s easy to compare the way DNS works to a using phone directory: every domain has a matching IP address, just like every name has a matching phone number. In the case of DNS, the IP addresses matching every domain is kept safe and easy to access for anyone. DNS servers, also known as name servers, is what stores these “phone numbers” for IP addresses.
DNS servers are key to a working internet because every time you send a request for a website using a domain name the DNS server first translates the domain name to an IP address and then sends that IP address to your computer, so that your computer can connect to the IP address. Your computer does not directly connect to a domain name.
Whether you visit a website, transfer a file or send an email, it is the DNS server which looks up the IP address for a domain name. Of course, you can avoid generating a DNS query by directly typing the IP address for the website server in your web browser’s address bar. However, it’s not as simple as it sounds because the IP address behind a domain name can change. For big websites you can also find that the website’s domain makes use of multiple IP addresses.
How do DNS servers do their work?
DNS servers co-ordinate two types of internet namespace and name servers save the data for every domain name, including the full DNS records for that domain. It is a very large database and it works smoothly only because there a literally millions of DNS servers which are all interconnected. DNS resolution requests are distributed amongst these millions of DNS servers.
Whenever you access a website or send an email you initiate a DNS lookup request, this involves contacting your local DNS server to see if it knows the IP address of the domain name in question. Your DNS server might have this address, particularly if it is a popular domain name. If it doesn’t it will ask the other DNS server for the information, and yet another, until it finds a DNS server with the information. Your DNS server then returns the IP address to you and also saves it in its local cache in case you want to visit that website again in the future.