Ever tried to visit a website only to see “this site can’t be reached?”
That’s a DNS error page. It means your browser couldn’t find the Internet Protocol (IP) address for that website. It’s a similar response to when you’re calling a number, and it comes up as “unavailable.”
Think of DNS as an “internet directory,” with IP addresses as numbers and domain names as actual names. In 2020, Verisign listed over 300 million domain names. Although, this wasn’t the case some 40 years ago. Paul Mockapetris developed the DNS system in 1983 and dubbed it the Domain Name System (DNS).
Screenshot: Paul Mockapetris
Back then, computers could only communicate using numbers, which were not easy to remember.
With time, it became difficult to maintain and correspond specific addresses with specific computers, hence the DNS. In this article, we’ll take a look at the DNS and how it operates.
How the DNS works with an Example
The DNS directory matches names to numbers. It does this through the help of multiple DNS servers around the world.
Image Credit: SEObility
These servers store DNS records that are domain names and link them to a specific IP address as soon as there is a query. You may also refer to these name servers as root servers. They store records of every domain name according to the location of the Top-Level Domain (TLD)
TLDs are domain extensions. You can find them at the end of your domain name as a two, three, or four-word character.
Let’s put this into perspective using an example. Say you search for www.scalahosting.com on the internet. Your computer sends queries to multiple DNS servers that get the IP address before loading a web page.
Screenshot: Scala Hosting IP Address
This query goes through four “authoritative name servers” that enable the DNS to function.
You might find all this difficult to understand, but hang on we’ll talk about them in a minute.
DNS (Recursive) Resolver
The DNS or recursive resolver receives DNS queries from your web browser or other web applications. The recursive resolver receives the hostname, which is the website and tracks down its IP address in the cache of your local device.
Therefore to translate the hostname you queried, the DNS resolver will first figure out where the records of .com are, then scalahosting.com, and lastly, www.scalahosting.com.
This DNS server resolves the query immediately when it finds the hostname. If not, it sends a query for the IP address of .com to an authoritative name server called DNS root server.
DNS Root Server
The root server is the name server for the Domain Name System’s root zone (DNS).
It contains an up-to-date list of all global top-level domains (TLDs) in its servers. For each of these TLD, there’s a matching numeric IP address of name servers with the TLD records on it.
So, the computer searches for the IP details of the TLD at the root server, which is .com in this instance and sends it to the TLD name server to continue the process.
Various organizations such as the University of Maryland, Verisign Inc, Cogent Communications, and the US Army Research Lab operate 13 root servers globally. Computers access these root servers using 13 numeric IP addresses to communicate from different locations.
Because of this, different local servers in one location can share one IP address and communicate with multiple servers in various locations using that location’s root IP address.
TLD Name Server
The TLD name server contains specific DNS records of the domain name and provides an authoritative name server’s IP details.
For this example, the TLD name server stores the IP address of Scala Hosting within the TLD name (.com). It then sends a specific IP address of the hostname to the DNS to continue the process.
The Domain Name System (DNS) may find it challenging to function correctly in its absence because of the specificity.
Although the Internet Assigned Numbers Authority (IANA) and Internet Corporation for Assigned Names and Numbers (ICANN) recognizes three types of TLD for different purposes:
- gTLD – Generic Top-Level Domains e.g .com, .net, .google .info
- sTLD – Sponsored Top-Level Domains e.g .gov, .mil .travel
- ccTLD – Country Code Top-Level Domains e.g .nz, .za, .us, .uk
You can access any type (depending on what you need it for) when you register your domain name.
You can also change your website’s TLD by using a 301 redirect.
Authoritative DNS Name Server
The authoritative name server is the final stop in the www.scalahosting.com query.
Here’s how it fits into the entire DNS process:
It gets records of the domain – www.scalahosting.com, the second-level domain – scalahosting.com, and returns the correct IP address to the DNS resolver, waiting at the first stage. But that’s not the only thing an authoritative name server does.
In cases when it has none or incomplete records, it reroutes the DNS resolver to another name server with specific records for that subdomain. A good example is my.scalahosting.com that brings you to the “sale section” of the website to purchase our services.
Like phone books, authoritative name servers may cover different DNS zones. This could be your company, your local area, or your country.
Regardless of the zone, it covers, the authoritative name server performs two tasks:
- First, it keeps records of domain names and their matching IP addresses.
- Second, it responds to the DNS resolver’s requests by matching the correct IP address with the domain names.
For the DNS process to be complete, the recursive resolver takes all these results and sends them back to your web browser, bringing up a web page.
In a Nutshell
Apart from being the roadmap for internet connection, the DNS has many other uses.
Some of these can range from:
- routing messages to email servers
- connecting app servers and databases within a web application
- connecting multiple players in an online game
Essentially, the DNS is the backbone of the modern-day internet. You’ll need to set up DNS to allow others access to your website and services.
How To Point a Domain Name To a Web Hosting Provider