Have you ever wondered how typing a simple web address in a browser connects you to the vast world of the internet? Domain name systems (DNS) have been the essential component of internet functionality since 1985. Like a phonebook, a domain name system (DNS) fills the gap between computers and humans by matching dynamic domain names to respective internet protocol (IP) addresses. In January 2024, 3.78 trillion DNS queries are performed. Each domain name system has a DNS zone that links to DNS servers, which allows for editing of the zone.
In this article, you will learn about what DNS and DNS servers are, how DNS works, authoritative vs recursive DNS servers, the best DNS servers, how to perform DNS lookups to types of DNS queries, and much more,
Let’s dive in!
What is DNS
The domain name system (DNS) is like the Internet’s phonebook. People access information with domain names, such as google.com or vpsmalaysia.com.my. Web browsers interact through IP addresses. DNS mainly translates domain names to IP addresses so browsers load internet resources. Simply put, DNS is a protocol that can turn domain names into IP addresses browsers use to load Internet pages. The three-domain name system performs a taxonomic classification structure for grouping cellular life into three domains: Archaea, Bacteria, and Eukarya.
What Is A DNS Server
The DNS server is a vital component of the domain name system, translating domain names into IP addresses. The dynamic domain name System (DNS) is a hierarchical and dispensed name service that provides a naming system to computers, services, and other internet resources or IP networks. The DNS server plays a crucial role on the internet by translating human-readable domain names, such as www.example.com, into numerical IP addresses, like 192.0.2.1. This process allows users to access websites easily through memorable names instead of having to remember complex numerical addresses.
Domain Name System Servers Include:
Domain name system examples are as follows:
1. Accessing Websites:
When the user types “www. google.com” into the browser. The domain name system (DNS) server translates the domain name into an internet protocol (IP) address like 142.250.190.78, which the computer uses to connect to Google servers. This translates to allowing access to websites without IP address remembrance.
2. Email Services:
When users email, the DNS server looks up the MX (Mail Exchange) records associated with the domain “gmail.com” (not “example.com”) to find the appropriate mail server’s IP address. This lookup allows the email to be routed correctly to the intended recipient’s mail server.
3. In CDN And Load Balancing:
CDN uses a domain name system (DNS) to direct users to the nearest server location for faster content delivery, such as ‘www.amazon.com.’ Geographic location optimizes streaming performance.
4. Gaming Servers:
Online gamers also connect players to appropriate game servers using DNS. When a user plays a game like Fortnite, the domain name system (DNS) directs the connection to the server to provide the best performance based on location.
How Does DNS Work?
When consumers enter a domain name and hit enter in the web browser’s address bar, they are taken to the desired website. However, this instant task comprises several steps called the DNS resolution process or DNS lookup. Examples of the domain name system resolution process tell how DNS works.
Some users want to go to the VPS Malaysia website and enter the domain name VPS Malaysia in the browser address bar. This is submitting a DNS request. Then, the user’s computer checks whether it has already stored a DNS entry of the domain submitted locally. A DNS records the IP address that matches the fully qualified domain name. The user’s computer searches its cache and host files. The host file is like a plain text file that maps hostnames to an IP address in the operating address. Meanwhile, cache is temporary data stored by software and hardware components.
Matching IP addresses for DNS service are commonly found in browser or internet service provider (ISP) caches. If no matching IP address is found in the host’s file and cache, the DNS resolution process will be enhanced with additional steps. This is how the domain name system works.
There are two essential types of DNS servers: authoritative and recursive DNS servers.
Authoritative DNS Servers vs. Recursive DNS Servers
Authoritative DNS servers and Recursive DNS servers both play an essential role in the domain name system, so understanding their differences is critical.
1. Recursive DNS Server:
When the user types the site address in the search browser, the domain name system makes browsing the internet easy. The first browser is connected to a recursive DNS server. Some people use recursive DNS servers provided by internet service providers, while Cisco umbrella customers use Cisco DNS servers.
Once the computer connects to the recursive DNS server, it asks, ” What is the IP address for this website?” The server doesn’t have this information but knows where to find it, so it connects to another DNS server to continue research.
So, when the user types the URL in the browser, the recursive DNS server checks its catch for the corresponding IP address. It sends an IP address to a browser to display the website if found. If not, the server retrieves the IP address through a DNS lookup process and stores it in the cache for a duration specified by that domain owner, known as the time to live (TTL). This optimized future request is for the same URL.
2. Authoritative DNS Server:
An authoritative DNS server holds a copy of a regional phone book that matches the IP address with domain names. It is responsible for answering recursive DNS name servers about where specific sites can be found. Authoritative DNS servers or authoritative name servers are the final way in the DNS resolution process. They store all information related to the remaining name the user wants to visit, including its IP address. The recursive resolver obtains the IP address and sends it back to the computer for the directory to the website.
Finally, the function of the domain name system is DNS caching, which stores IP addresses collected from authoritative name servers as temporary data. In other words, DNS catching means that the next time a user wants to visit the same website, it will simply send back the IP address match obtained.
Authoritative DNS Servers VS Recursive DNS Servers
Feature | Authoritative DNS Servers | Recursive DNS Server |
---|---|---|
Role | Authoritative DNS servers are critical to providing definitive answers about domain information and ensuring data integrity through DNSSEC. | Recursive DNS servers are essential for resolving user domain names, retrieving and catching data to improve speed, and validating security measures like DNSSEC. |
Data Ownership | Maintain and control DNS data for its remaining zones. | It does not need any DNS data retrieved data as needed. |
Zone Transfers | Can perform on-transfer to synchronize DNS records. | Does not perform a zone transfer. |
Security Role | Provide DNSSEC signature to ensure data Integrity. | Validate DNSSEC signatures when retrieving data. |
Scalability | Limited scalability due to maintaining all threat records. | It is highly scalable as it catches data from multiple sources. |
Configuration Complexity | Required configuration for each domain it serves. | Simple configuration mainly points to the upstream server. |
Redundancy | Typically, it involves various servers for failover. | Reliance on multiple stream servers for redundancy. |
Latency | Handles theories for its domain efficiently. | Higher initial latency is due to numerous servers being queried. |
Load Handling | Handles queries for its domain efficiently. | Balances load by catching and distributing requests. |
Examples In Uses | Used by domain registrars and hosting providers for authoritative records. | Used by ISP’s cooperation for client-side DNS resolution. |
Response Type | Provides an authoritative response for the domain it manages. | Provide known authoritative responses unless cached. |
DNS Servers and IP Addresses
DNS servers and IP addresses are essential components of internal infrastructure that enable users to accept websites.
A. Domain Name System Servers:
DNS servers translate human-readable remains like (example.com) into machine-readable IP addresses like 192.0.2.1. This translation is necessary because computers use IP addresses on the network.
Types of DNS Servers:
Domain name system servers have four types:
1. Recursive Domain Name System Server:
Recursive DNS or recursive nameservers use a phone book to look up numbers to contact a person or a company. These companies don’t decide which number belongs to which company or person; this is the responsibility of domain name system registrars.
2. Authoritative Domain Name System Server:
Authoritative domain name system servers or authoritative nameservers are like phonebook companies publishing multiple phone books, one per region. They could be more scalable but can efficiently handle domain-specific queries.
3. Root Domain Name System Servers:
These servers are directories to the appropriate TLD server at the top of the DNS hierarchy.
4. TLD Domain Name System Servers:
The server manages DNS records from the top level to the main, like .com, .org, .net, and directories to authoritative DNS servers that force specific domain names.
B. IP Addresses:
An IP address is an identifier assigned to each device connected to a network. It allows devices to communicate with each other over the Internet.
Types Of IP Addresses:
There are two types of IP addresses:
1. Ipv4:
Consists of all groups of numbers separated by dots( 192.0.2.1). It is the most widely used format, limited to about 4.3 billion unique addresses.
2. IPv6:
A newer format is a group of hexadecimal numbers separated by colons(e.g., 2001:0db8:85A3:0000:0000:8a2e:0370:7334). It vastly increases the number of available addresses.
IP Addresses Role in Domain Name System:
IP addresses are essential for routing internet traffic to the correct destination. DNS servers vs domain IPs give users access to websites using a remembered domain name instead of numeric IP addresses. By managing domain names to IP addresses and translation, the DNS server makes it possible for consumers to navigate the web efficiently with the need to remember numeric addresses.
Devices on the Internet use IP addresses to connect to websites. Without DNS, users must remember the IP address for every site they visit, like carrying a website phonebook. DNS helps the user type a site name and translate it into an IP address. For example, more than typing www.vpsmalaysia.com.my is insufficient because the server only understands the IP address. Then, the DNS server finds the correct IP for www.vpsmalaysia.com.my, sends it to the browser, and then the website appears on screen because the browser knows where to connect.
Best DNS Servers
Best DNS servers include:
1. CloudFlare:
- Primary: 1.1.1.1
- Secondary: 1.0.0.1
- Feature: Cloudflare is one of the fastest DNS services available, with a global network, low attention, and high availability. It uses advanced protocols like DNS over HTTPS and TLS to protect browsing data from interception.
- Benefits: Give excellent privacy with the policy of deleting logs after 24 hours and don’t collect IP addresses.
- Consideration: When it does not block ads, it offers some primary filtering options for Malware.
2. Google Public DNS:
- Primary:
8.8.8.8
- Secondary:
8.8.4.4
- Feature: Google’s Public DNS servers are known for their speed and reliability. They utilize Anycast routing to improve performance and support IPv6. They also have mechanisms to prevent DNS-based attacks like cache poisoning.
- Benefits: Enhance security by authenticating DNS data through DNSSEC and redirecting requests from malicious sites.
- Consideration: Privacy concerns exist due to Google’s data collection practices, although it claims to delete logs after 48 hours.
- Use Cases: This solution suits tech-savvy users who need fast and secure DNS but are less concerned about data privacy.
3. Quad 9:
- Primary: 999
- Secondary: 149.112.112.112
- Feature: Quad9 focuses on security, blocking access to malicious cheap DNS domains by leveraging threat intelligence feeds. It supports DNS over HTTPS and DNS over TLS for added privacy.
- Benefit: Provides a free service with no logging of IP addresses, ensuring user privacy.
- Consideration: It is primarily designed for security-conscious users and offers fewer customization options than some competitors.
- Use Cases: Best for users with strong privacy and security without complex configuration.
How to Perform A Domain Name System Lookup
DNS is concerned with a domain name being translated into an IP address. Learning how this process works helps to follow the DNS lookup path as it travels from a web browser through the DNS lookup process and back again. Let’s take a look at the steps:
It is worth noting that DNS lookup information is sometimes caught locally inside the querying computer remotely in the domain name system infrastructure. There are typically 8 steps in DNS lookup. When domain name system information is cached, steps can be skipped from the lookup process, which makes it quicker. The examples below outline all eight steps when nothing is cached.
8 Steps In A Domain Name System Lookup:
DNS Lookup steps are as follows:
- A consumer type example.com in their web browser search query travels along the internet and is Ultimately received by a DNS recursive resolver.
- The resolver then queries a DNS root name server(.).
- The routing server responds to the resolve with its TLD address. A DNS server like .com or .net stores information for this domain. When searching for example.com, the request is pointed toward the .com TLD.
- The resolver requests the .com.
- TLD server responds with the IP address or domain name and DNS server example.com
- Then, the recursive resolver sends a query to the domain names server.
- The IP address, for example.com, is returned to the resolve from the nameserver.
- The domain name system resolver initially responds to the web browser with the requested domain IP address.
Once the 8th step of DNS lookup returns the IP address, for example.com, the browser can request the web page.
- The browser then performs an HTTP request to the IP address.
- The server at the IP address returns the website page to be rendered in the browser.
What Is A DNS Resolver?
A DNS resolver or DNS client is a server that receives DNS requests from users and performs steps to resolve the domain name to an IP address.
The first step in the domain name system was dealing with the client and making the initial request. It acts as an intermediary between the client and the DNS system and performs the following tasks:
- Querying: This method requests the domain name system server (root, TLD, authoritative) to find the IP address.
- Catching: Stores DNS to speed up future requests for the same domain.
Common DNS Records
Standard and dynamic domain name system records include:
1. A Records:
- Purpose: Map or dynamic domain name to its corresponding IPv4 address.
- Detail: Most websites have a single A record, but larger websites have multiple for load balancing and direct users to various IP addresses during high traffic.
2. AAAA Record:
- Purpose: Maps a domain name to its corresponding IPv6 address.
- Detail: Similar to the A record, but specifically for IPv6, it allows for a longer IP address format.
3. NS Records:
- Purpose: Specifies authoritative names server for a domain.
- Details: Direct queries to the correct server after including primary and backup servers for reliability.
4.TXT Record:
- Purpose: Allow the entry of tax data in DNS.
- Details: The initial Internet for human-readable notes is now used for machine-editable information like domain verification, email security, and anti-spam measures.
5. CNAME Records:( Canonical Name record):
- Purpose: Create an alias for a domain, pointing to another domain record.
- Details: CNAME records are used to resolve multiple domain names to the same IP address by redirecting one domain to another. For example, “www.vpsmalaysia.com.my” can be redirected to “vpsmalaysia.com.my” allowing both domains to point to the same web content.
What Are The Types Of DNS Queries?
The following are the types of DNS Queries:
1. Recursive DNS Queries:
Recursive DNS queries take place between the client and the recursive server. The answer given at the full name is either a solution or an error message saying the name cannot be found. So, the recursive queries provide the answer or give an error.
2. Iterative DNS Queries:
Iterative DNS queries happen between nonlocal name servers (such as the root, TLD, authoritative name servers, or recursive resolver) and local DNS servers. Iterative queries do not demand a resolution name; the new server in place responds with a referral. The root servers refer to the recursive server to TLD, corresponding to an authoritative server.
The authoritative server gives the domain name to the recursive server if it has it. Iterative queries are resolved in either an answer or a referral.
3. Non-Recursive Queries:
Non-recursive queries are those for which a recursive resolver knows where to get an answer. The answer can be cached on the server, or the server can skip the root and TLD servers and go directly to specific authoritative servers.
There is no need for non-recursive, therefore, there is no request for any more queries. Non-recursive queries resolve in the answer. This is considered a non-recursive query if a recursive resolver caches an IP address from the previous session and servers that address upon the subsequent request.
In the DNS basic procedure, a user makes a recursive query to a recursive resolver to make a series of iterative queries, resulting in a referral to the following query. The query files to the authoritative server. If the recursive resolver recognizes it will find the answer, a non-recursive query will be made to retrieve it. The information is then stored on the recursive resolver-see DNS caching section–so that a non-recursive query can retrieve it in the future.
What Is DNS Caching?
Caching temporarily stores data in a location, which results in the reliability of data requests. DNS caching minimizes the time it takes to get an answer to a DNS query. Catching enables DNS to collect previous answers to queries closer to users and collect the same information for them faster the next time it is queried.
DNS data can be cached in many places. Some typical phases are given below.
1. Browser:
Some browsers, like Google Chrome, Apple Safari, and Mozilla Firefox, catch DNS data for a set time. The browser is the first catch that gets checked when a DNS request is made before the request leaves the machine for the local DNS resolver server.
When a request is made, the browser cache is the first location check for the requested record. In Chrome, see the status of the DNS cache by going to chrome://net-internals/#dns.
2. Operating System OS Level DNS Caching:
Some OS have built-in DNS resolvers called stub resolvers, which cache DNS data and handle all queries before sending them to an external server. The OS is usually queried after the browser or other querying application.
3. Recursive Resolver:
A DNS recursive resolver can catch the DNS query answer. Resolver records are necessary to return a response and can skip steps in the DNS resolution process. For example, if there is always an A resolver but not NS records, the resolver skips the root server and TLD server directly.
Conclusion
The dynamic domain name system (DNS) is an integral part of the application layer in networking. It acts like an internet directory, translating the friendly name of the domain into a numeric IP address that computers use for communication.
Without DNS, the internet is more complicated; complex IP addresses for every website must be remembered.DNS makes the internet user-friendly and allows easy access to websites and online services by simple and memorable names. Experience fast and reliable DNS services that make your website accessible and user-friendly with VPS Malaysia DNS services. Have any questions? Ask in the comment section below!
Secure your ideal domain name today. Visit VPS Malaysia to get started!
Leave a Reply