DNS: How It Is used to access a website(2021)

1
796
web-dns

Ever wondered while browsing a website on how it is working in the background. How you can access websites sitting anywhere in the world on the internet. Well! the answer is DNS. DNS is what lets users connect to websites using domain names instead of IP addresses. In this article, I will let you know how DNS is used for accessing any website on the internet which we use every day. So, let’s dive in and make it simple.

What is DNS?        DNS abbreviation explained

Billions of computers and mobile devices are connected to the internet. Every device connected to the internet has its own IP address, which is used by other devices to locate the device.

It is not possible to remember the IP address of every computer or website URL. The Domain Name System (DNS) turns domain names into IP addresses, which browsers use to load internet pages.

It handles the mapping between human-readable hostnames, and IP addresses that computers use. DNS servers make it possible for people to input normal words into their browsers, without having to keep track of the IP address for every website.

The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like www.nytimes.com.

Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources. DNS exists on the Internet as well as in a private network like a school to manage resources (example-computers) within that private network.

Let’s look into some other terms related to DNS.

Also Read: HTTP and HTTPS: Know The Comprehensive Differences

IP Address  IP Address

An IP address is a unique group of numbers, separated by full stops. Each computer and server that uses the Internet has its own IP address, and this enables computers to communicate over the network.

As computers deal in numbers, it makes sense that computers are identified via IP addresses. But for humans, remembering a string of numbers each time you want to visit a website just doesn’t work. That’s where domain names come in.

Domain Name    DNS Domains

A domain name is the name of your website (i.e., weblroot.com).  Domains can be purchased through a domain registrar, or are often provided for free through your hosting provider.

Without domain names, to open a website you would need to remember and type in a site’s IP address (not easy!) Using domain names makes visiting websites quick and straightforward and gives the process a human approach by using words instead of numbers.

Main Components of DNS

 

 

DNS Network Example

 

Fundamentally, the DNS is a database of website domains and IP addresses. Its key task is to store the data and link the domain names and IP addresses when requested. However, there are a couple of other crucial aspects of DNS that underpin its functionality:

  • Distribution – DNS records are distributed over a vast network of connected servers, with each server only handling a small portion of data.
  • Record Maintenance – This process involves locating IP addresses connected to domain names and storing this data.
  • Domain Namespace Hierarchy – The hierarchical structure of DNS enables a user to quickly find the correct server that hosts the DNS records that they require. (We will cover this in more detail next).

These mechanisms combined ensure that when you enter a domain name into your browser, the name is converted into an IP address. However, it is the domain namespace that enables the DNS to work so efficiently.

Domain Namespace

The area namespace refers could be a hierarchical construction of the DNS servers. Let’s have a glance at how this construction allows the DNS to work.

DNS exists in inverted tree construction, with the root at the top “.” demonstrates this construction. At the very best of the tree may be a NULL node, which is mostly expressed as “.”.The full domain name is constructed by traversing the tree from top to bottom, for example, www.support.weblroot.com (note the trailing full stop), is called a fully qualified domain name (FQDN).

 

DNS Hierarchy Explained

How Does the DNS Process Work?           

Step 1: Requesting Website Information

Let’s visit an online site by typing a vicinity identify into a net browser. Our pc will begin resolving the hostname, reminiscent of   www.weblroot.com. Our pc will then hunt for the IP  address associated with the world identify in its native DNS cache.

This cache stores the information that our computer has recently saved. If it’s current domestically, then the net site will likely be displayed. If our pc doesn’t have the info, it should do a DNS question to retrieve the correct info.

Step 2: Contacting the Recursive DNS Servers

Next, if the information isn’t in your PC’s native cache, then it should question one other server. Recursive DNS servers have their native cache, very like your pc. Many ISP’s(Internet Service Provider) use the identical recursive DNS servers, it’s doable that a frequent area identify is already in its cache. If the world is cached, the question will finish right here and also the information processing system exhibited to the person.

Step 3: Querying the Authoritative DNS Servers

If a recursive DNS server or servers shouldn’t have info saved in its cache reminiscence, it seems to be elsewhere. The question then continues up the chain of authoritative DNS servers. The search will proceed till it finds a nameserver for the realm. These authoritative identify servers are in command of storing these data for their respective domains.

Step 4: Accessing the DNS Record

To locate the IP address for weblroot.com, the pc will question the authoritative name server for the address record (A record). A Recursive DNS server accesses the A record for weblroot.com from the authoritative name servers. It then stores the record in its native cache.

If another query requests the A record for weblroot.com, the recursive server will have the answer. All DNS records have a time-to-live value, which shows when a record will expire. After some time has passed, the recursive DNS server will ask for an updated copy of the records.

Step 5: The Final Step

The Recursive DNS server has the information and returns the A record to your computer. Our computer then stores the record in its local cache. It reads the IP address from the DNS record and passed it to our browser. The web browser will connect to the web server associated with the A records IP and display the website.

This whole process might seem complicated but really takes very little time at all. The entire lookup process, from start to finish, takes only milliseconds to complete. For a better understanding, please see the below illustration which explains shortly.

DNS Query

Now let’s see what are DNS Query Types

A DNS query is a request initiated by a client to interact with the DNS server. So every time a website URL is being typed in a web browser or an email is being sent,  a DNS query is being initiated. DNS Query Types can also be seen as the query path where the set of queries starts from the initial question from the client and finishing with the answer the client receives.

It can be as simple as a client asking a server and receiving an answer directly. Here, “client” can be an application or a machine that has a resolver running on it. Therefore, a web browser is also a client, and a laptop or mobile phone can also be a client.

Recursive Query

In a recursive query, a DNS client provides a hostname, and the DNS Resolver “must” provide an answer—it responds with either a relevant resource record or an error message if it can’t be found.

The resolver starts a recursive query process, starting from the DNS Root Server until it finds the Authoritative Name Server (for more on Authoritative Name Servers see DNS Server Types below) that holds the IP address and other information for the requested hostname.

Iterative Query

In an iterative query, a DNS client provides a hostname, and the DNS Resolver returns the best answer it can. If the DNS resolver has the relevant DNS records in its cache, it returns them. If not, it refers the DNS client to the Root Server or another Authoritative Name Server which is nearest to the required DNS zone. The DNS client must then repeat the query directly against the DNS server it was referred to.

Non-Recursive Query

A non-recursive query is a query in which the DNS Resolver already knows the answer. It either immediately returns a DNS record because it already stores it in the local cache, or queries a DNS Name Server which is authoritative for the record, meaning it definitely holds the correct IP for that hostname.

In both cases, there is no need for additional rounds of queries (like in recursive or iterative queries). Rather, a response is immediately returned to the client.

So as we have some information about DNS and its query types. Let’s dig in more to see different types of DNS servers that are involved in DNS Query Resolution.

Within the DNS there are essentially two types of systems: authoritative name servers that deliver authoritative answers (data) in response to queries. The queries originate from what is called resolvers. A resolver is simply a part of the DNS infrastructure that issues queries to resolve (translate) names into IP addresses.

DNS Server

The following are the most common DNS server types that are used to resolve hostnames into IP addresses.

DNS Resolver

A DNS resolver (recursive resolver), is designed to receive DNS queries, which include a human-readable hostname such as “www.weblroot.com”, and is responsible for tracking the IP address for that hostname.

DNS Root Server

The root server is the first step in the journey from hostname to IP address. The DNS Root Server extracts the Top Level Domain (TLD) from the user’s query — for example, www.weblroot.com —.provides details for the .com TLD Name Server. In turn, that server will provide details for domains with the .com DNS zone, including “weblroot.com”.

There are 13 root servers worldwide, indicated by the letters A through M, operated by organizations like the Internet Systems Consortium, Verisign, ICANN, the University of Maryland, and the U.S. Army Research Lab.

Authoritative DNS Server

Higher-level servers in the DNS hierarchy define which DNS server is the “authoritative” name server for a specific hostname, meaning that it holds the up-to-date information for that hostname.

The Authoritative Name Server is the last stop in the name server query—it takes the hostname and returns the correct IP address to the DNS Resolver (or if it cannot find the domain, returns the message NXDOMAIN).

 

So now we are aware of how DNS is working in the background. Let’s see some other components of DNS which play an important role in the resolution of a domain or website. These are called DNS Record Types.

DNS Record Types

DNS records are stored in authoritative servers. These records provide information about a domain, including its associated IP address for each domain. All domains must have a specific set of default records.

Below is a list of the most common record types and frequently utilized DNS records. Let’s look over each type of record.

  1. Address Mapping record (A Record)—also known as a DNS host record, stores a hostname and its corresponding IPv4 address.
  2. IP Version 6 Address record (AAAA Record)—stores a hostname and its corresponding IPv6 address.
  3. Canonical Name record (CNAME Record)—can be used to alias a hostname to another hostname. When a DNS client requests a record that contains a CNAME, which points to another hostname, the DNS resolution process is repeated with the new hostname.
  4. Mail exchanger record (MX Record)—specifies an SMTP email server for the domain, used to route outgoing emails to an email server.
  5. Name Server records (NS Record)—specifies that a DNS Zone, such as “example.com” is delegated to a specific Authoritative Name Server, and provides the address of the name server.
  6. Reverse-lookup Pointer records (PTR Record)—allows a DNS resolver to provide an IP address and receive a hostname (reverse DNS lookup).
  7. Certificate record (CERT Record)—stores encryption certificates—PKIX, SPKI, PGP, and so on.
  8. Service Location (SRV Record)—a service location record, like MX but for other communication protocols.
  9. Text Record (TXT Record)—typically carries machine-readable data such as opportunistic encryption, sender policy framework, DKIM, DMARC, etc.
  10. Start of Authority (SOA Record)—this record appears at the beginning of a DNS zone file, and indicates the Authoritative Name Server for the current DNS zone, contact details for the domain administrator, domain serial number, and information on how frequently DNS information for this zone should be refreshed.

So this is some basic information about DNS. Let’s look for some more interesting information about DNS

Some Interesting Facts About DNS Servers

Before DNS servers came into existence, a website could only be identified by machines through its hostname. All of these hostnames were saved in one large file known as the hosts.txt. However, this method of managing hostnames became hard to maintain given the tremendous growth in computer networks during the period between 1970 and 1980.

Here are some of the most interesting facts about DNS servers that you probably never knew about.

Over the years the architecture and use of DNS servers have been extensively researched and applied to enhance web security and fast web browsing.

Millions of Registered Domain Names

According to Domain Tools Statistics, there are over 100 million domains registered in the whole world (and most of us probably visit 10 domains daily). Most of these domains are associated with businesses, small organizations, and individuals.

This pretty much shows how effective the use of DNS has been to the current technological landscape.

DNS is more than  30 Years Old

DNS servers trace their roots back to November 1983 from two papers that were published by Paul Mockapetris. In 1983, he proposed a Domain Name System architecture in RFC 882 and RFC 883.

He had recognized the problem in the early Internet (then ARPAnet) of holding name to address translations in a single table on the host’s file of an operating system. Instead, he proposed a distributed and dynamic DNS database: essentially DNS as it exists today.

Started With 6 Original Top-Level Domains

It’s even more interesting to note that during the initial days in the 80s there were only 6 first top-level domains that were implemented. Currently, the number has gone up to more than 700 top-level domains.

These six top-level domains included; .com, .org, .biz, .mil, .net, and .edu.Now there are country wise domains. For example, for the United States, it is .us.The below illustration shows country-wise domains

Top Level Domains

DNS Works in Forwarding and Reverse 

It is interesting to know that DNS not only converts hostnames to IP addresses but can also convert IP addresses to domain names. The former is known as a forward DNS lookup (domain to Ip)whereas the latter is referred to as a reverse DNS lookup(IP to Domain).

While reverse DNS lookups are rarely used (who’s going to remember an IP address instead of a hostname?), they usually help network administrators whenever they want to troubleshoot certain domain aspects by using utilities like ping.

Easy Target for Hackers

One major disadvantage of DNS is that it is highly targeted for hacking purposes. Many hackers usually try to gain access to the DNS server records of particular websites. If successful, they can be able to redirect users to their own sites where they can carry out phishing of user information or carry out other malware attacks.

By being able to understand how DNS servers work, you can be able to know how best to protect your devices and sites. Now there are many different tools and solutions available to secure your DNS for business or personal use. DNS servers certainly have great advantages that can be leveraged for both personal and business usage.

Conclusion

As you can see, DNS is the backbone of the Internet, ensuring that your browsers display the websites that you request. Working in the background, DNS stores searches for, and matches all domain names to IP addresses, enabling computers to connect, and websites to be served. So next time you are growing a website on the internet you will have a fair idea of how it is working.

 

Have you ever thought how many times in a day you have initiated a DNS query to a DNS server by searching a website in a web browser or by sending an email?

 

Internet Illustration for worldwide

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here