What is DNS (Domain Name System)?
Before diving into DNS, let’s brush up on the basics and understand the differences between various terms that confuse users.
IP Address
IP stands for Internet Protocol, which is the order of rules that allow devices to make contact with each other over the internet. A unique identifier is needed to keep track of who’s doing what with billions of people accessing the Internet every day. This problem is solved by the Internet Protocol, which assigns IP numbers to each device that can access the Internet.
Domain Name
The domain name is the text that a user types in the browser’s window to reach a specific website, such as Google Chrome and Firefox. For example, andromedia.com.au is a domain name for Andro Media. All domain names are managed by the domain registries delegated to the registrars. A domain name registrar is a company that manages the reservation of domains and assigns IP addresses to them.
Subdomain
A subdomain is the extension of the domain, which is usually used for business offerings such as creating standalone pages for a blog or a service. For instance, https://demo.andromedia.com.au is a URL, ‘demo.’ is a subdomain of the ‘andromedia.com.au‘ root domain. A subdomain always sits before the root domain in the URL
URL
A uniform resource locator (URL), also known as a web address, is a string that includes a website’s domain name along with other details like the path and protocol. For instance, “andromedia.com.au” is the domain name, “https” is the protocol, and “/contact-us/” is the path to a particular page on the website in the URL “https://andromedia.com.au/
How Does DNS Work?
Now coming back to the Domain Name System (DNS), it serves as the internet’s phone book. People use domain names like ‘google.com‘ to access online information. Through Internet Protocol (IP) addresses, web browsers can communicate and In order for browsers to load online information, DNS converts domain names to IP addresses.
Every Internet-connected device has an IP address that is specific to it and that other computers can use to locate it. DNS servers remove the need for people to memorize more complicated, contemporary alphanumeric IP addresses
To understand how the translation from the domain name to IP address and the rendering of the website takes place, it’s important to know that all this happens without the user’s intervention.
-
Searching for a website
A user types a domain name into a web browser that the computer searches for in its local DNS Cache i.e. temporary storage of DNS records. If found, the website is rendered on the browser or else the computer starts a DNS conversion also called a DNS query.
-
Querying to a DNS Server
The query is carried to the user’s Internet Service Provider (ISP for e.g. Telstra) where its DNS server will try to find the correct IP address. These servers also have their own cache and if still not found in the ISP’s DNS server, it’s made to contact the DNS server outside of the user’s ISP.
-
Contacting outside DNS Server
To understand this step, it’s important to know various types of DNS servers:
- Recursive resolvers/DNS recursor – This is the first stop for the DNS query as explained in the point 2 above.
- Root name servers – This server is the first external DNS server the DNS query goes to if not cached in the DNS server mentioned above. It is at the very top of the hierarchy of the name servers also called as root that stores all the IP addresses of the other name servers described below. The recursive resolver/DNS recursor asks the root name server for the IP address of the TLD (Top level domain) name server, which in this case is ‘.com.au’
- TLD name server – This server maintains information on all the authoritative name servers for the particular top level domain.
- Authoritative nameserver – After receiving the response from the above two servers, this nameserver responds with the appropriate IP address.
-
Retrieving and Storing records
The authoritative server finally responds with the IP Address that is added to the ISP’s local cache for easy rendering of the webpage, when the user requests the same domain name next time.
-
Displaying website
The computer then receives the website, and the browser displays the requested webpage.
What is a DNS record?
DNS records are files stored in authoritative DNS servers that contain instructions about a domain. They include the IP address linked to the domain and how to respond to requests for that domain.
These are the most typical kinds of DNS records:
Record Type | Description |
---|---|
A(Address) record | This record maps IPv4 address to Domain Name. IPv4 is a numbering system used by the IP address such as IPv4 for https://andromedia.com.au is [104.21.10.48]. |
AAAA record | This record maps the IPv6 address for a domain. IPv4 has its limitations in terms of addressing range as the internet and Internet of Things (IoT) systems grow. IPv6, which employs a longer address format and can support more addresses. For Instance, IPv6 for https://andromedia.com.au is [2606:4700:3031:0:0:0:6815: |
NS(Name Server) record | This record indicates which authoritative name server is responsible for the domain and it’s IP address a user is searching for. |
TXT(text) record | This record is used to store any text-based descriptive information. Certain domains append a specific character string to their TXT files in order to facilitate domain search engine optimization and ownership verification. |
MX(mail exchange) record | This record directs email to the mail server. |
DNS Security
The process of defending DNS infrastructure against cyberattacks to maintain its speed and dependability is known as DNS security. When the DNS protocol was first developed, integrated security was not included.
To learn more about DNS Security, check out our article: What is DNS Security?
Sources:
https://www.cloudflare.com/en-
https://www.zenarmor.com/docs/
https://www.techtarget.com/
https://www.cloudflare.com/en-