DNS
May 20, 2023
DNS (Domain Name System) is a hierarchical naming system that is used to translate human-readable domain names into IP (Internet Protocol) addresses that computers can understand. It is an essential component of the internet infrastructure as it enables websites to be located and accessed by users.
Purpose
The primary purpose of DNS is to simplify the process of accessing websites on the internet. Without DNS, users would have to remember the IP addresses of all the websites they want to access. This would be a challenging task as there are millions of websites on the internet.
DNS provides a way of mapping domain names to IP addresses, allowing users to access websites using a simple and memorable domain name instead of a complex and difficult-to-remember IP address.
Usage
DNS is used every time a user types a domain name into a web browser. When the user enters the domain name, the browser sends a request to a DNS resolver, which is responsible for looking up the IP address associated with the domain name.
The DNS resolver first checks its local cache to see if it has the IP address for the domain name. If it does not have the IP address, it sends a request to a DNS root server, which is the top level of the DNS hierarchy.
The DNS root server then directs the resolver to the appropriate top-level domain (TLD) server. This server is responsible for managing domain names that end with a specific TLD, such as .com, .org, or .net.
The TLD server then directs the resolver to the authoritative name server for the specific domain name. The authoritative name server is responsible for storing information about the domain name and its associated IP address.
Once the resolver has received the IP address from the authoritative name server, it caches the information locally and sends it back to the user’s web browser. The web browser can then use the IP address to connect to the website.
DNS Hierarchy
DNS is organized in a hierarchical structure, with each level of the hierarchy responsible for managing a specific part of the DNS system.
Root Servers
At the top of the hierarchy are the DNS root servers. There are 13 root servers located around the world, each with their own unique IP address. These servers are responsible for directing DNS resolvers to the appropriate TLD server.
Top-Level Domain (TLD) Servers
Below the root servers are the TLD servers. There are hundreds of TLDs, including generic TLDs (gTLDs) such as .com, .org, and .net, and country code TLDs (ccTLDs) such as .uk for the United Kingdom and .au for Australia.
Each TLD has its own set of authoritative name servers that are responsible for managing domain names that end with that particular TLD.
Authoritative Name Servers
At the bottom of the DNS hierarchy are the authoritative name servers. These servers are responsible for storing information about a specific domain name and its associated IP address.
DNS Records
DNS records are used to store information about domain names and their associated IP addresses. There are several different types of DNS records, each with its own purpose.
A Records
A records are used to map a domain name to an IP address. They are the most common type of DNS record and are used to enable users to access websites using a simple and memorable domain name.
CNAME Records
CNAME records are used to create an alias for a domain name. They are often used to provide a more memorable name for a particular service or to redirect traffic from one domain to another.
MX Records
MX records are used to specify the mail servers that are responsible for handling email for a particular domain name.
TXT Records
TXT records are used to store arbitrary text data about a domain name. They are often used to provide additional information about a domain name or to verify ownership of a domain name.
DNS Security
DNS is a critical component of the internet infrastructure, and it is essential that it is secure and reliable. There are several mechanisms in place to ensure the security of the DNS system.
DNSSEC
DNSSEC (DNS Security Extensions) is a set of extensions that add security to the DNS system. It provides a way of digitally signing DNS records, allowing users to verify that the information they receive is authentic.
DNS-over-HTTPS
DNS-over-HTTPS (DoH) is a protocol that encrypts DNS queries and responses, providing an additional layer of security. DoH prevents third parties from intercepting DNS requests and potentially modifying them.