What is DNS?

The Domain Name System (i.e., DNS) is a decentralized naming database that identifies and translates internet domain names that are readable by humans into comprehensible IP addresses for machines that store the information called for by the browser.

DNS is usually associated with a phonebook or the contacts app on your phone. To explain the analogy,  DNS correlates domain names to their underlying IPs, kind of like how we match names to phone numbers on our cells.

What’s the purpose of DNS?

The short answer is, to identify domain names and translate them into IP addresses. We’ll be getting into a more detailed explanation of how that takes place but essentially without DNS, the internet would not exist. Computers are set up in large networks that communicate with each other via wires and are identified using IP addresses. The human mind is not built to or capable of memorizing every IP address on the internet, that’s where DNS comes in.

How does DNS work?

Technically, to retrieve the desired web page you don’t have to actually type in its name, you can type in the IP address instead. But normally, you just type in its URL. After you type in the URL, a request will be sent to a DNS server, which will search its database to find a matching IP address for that domain name. When it’s retrieved, the DNS will resolve that domain name to the IP address of the desired website. Finally, your computer will be able to communicate with the web server and retrieve the corresponding web page.

how dns works

The following breaks down each step that DNS takes when you enter a URL in an address bar and press search.

When you type in Buzzfeed.com in your browser and if said web browser fails to find the IP address in its cache, then the DNS request travels to the resolver server.

The Resolver Server is your ISP (Internet Service Provider), it can also operate through public servers managed by Google.

Next, your  Resolver Server will send the request to travel to one of the 13 Root Servers. The root servers are at the top of the DNS hierarchy and have their own set of IP addresses.

The servers are operated by:

  • The University of Southern California   
  • Information Sciences Institute
  • Cogent Communications
  • University of Maryland
  • NASA (Ames Research Center)
  • Internet Systems Consortium, Inc.
  • US Department of Defense (NIC)
  • US Army (Research Lab)
  • Netnod
  • Verisign, Inc.
  • RIPE NCC
  • ICANN
  • WIDE Project

Alternatively, the Resolver Server may have already stored the IP address of the website. 

Then your request is sent to the assigned top level domain server for the .com domain (read example for  Buzzfeed.com) which will then contact authoritative name servers that correspond a long list of IP addresses with their URLs (the list is constantly updated whenever someone buys and registers a domain name).

Now that your IP address is retrieved it’ll get sent back to the Resolver Server and, finally, on your computer.

Additional steps do include caching DNS entries for future use.

DNS cache

DNS cache is temporarily stored in your computer’s OS. There you’ll find recently visited website domains or more frequently visited domains. As the definition of cache entails, you’ll be able to retrieve it quickly; thus, a website’s URL can be assigned to the corresponding IP more easily. DNS caching makes work efficient for both your laptop and Resolver Server. We all have our regular websites so your computer either knows the correct IP right away or it will be able to get it directly from the resolver server.  This process works most of the time for most people, however, problems are bound to arise when a website changes IP addresses; thus causing loads of errors. The solution is more straightforward than it seems, you can manually clear out the DNS cache. If you’re running Windows you can actually do just by opening the command prompt and jotting down the following:

 

>ipconfig/flushdns

 

DNS records

The domain name along with its corresponding IP address along with some other data are referred to as a DNS record. DNS records are essentially database records, they can be found in DNS servers and are used to locate URLs to corresponding IP addresses and do the job of connecting users’ websites to specific Web servers.

Commonly used DNS record types are:

  • A (Host address)
  • AAAA (IPv6 host address)
  • ALIAS (Auto resolved alias)
  • NS (Name Server)
  • SOA (start of authority)

For a more detailed description of the DNS record types and what they represent refer to our glossary article on DNS records.

Without DNS one would only be able to access your website by typing in your IP address, and DNS records serve as an instruction manual for the DNS server.

The above-mentioned DNS record types are one of the most common “instructions” and syntax of DNS.

An essential part of your DNS records are Name Servers.

Name Servers allow individuals to access your website with your domain name, rather than an elaborate IP address. They are a part of your registrar with the sole intention of pointing your domain to the place where your site is being hosted.  Changing your name servers allows you to change your website host without having to move your domain to a new registrar.