The human mind often does far better at remembering text than it does remembering numbers - probably for the better. However, computers very much work the other way around and there’s a lot more for them to remember. What if we allowed humans to remember website names as text (google.com) but also had a system for converting these names to actual numerical addresses? That’s where a DNS comes in.
The Domain Name System (DNS) is a hierarchical and decentralized naming system for translating human-readable domain names (“getstream.io”) into IP addresses (143.204.29.3
), allowing users to access websites and other online resources without needing to remember numeric IP addresses. DNS can be categorized into different types based on functionality and roles within the DNS infrastructure.
Say we want to look up “getstream.io”. Before we looked up anything on the internet, the system would first check if the addresses are cached either on the browser or on the operating system which would save us quite a bit of time. If not, we approach the DNS hierarchy.
First, Root DNS servers are at the top of the hierarchy, managing the root zone and directing queries to appropriate top-level domain (TLD) servers. These servers handle domain extensions like .com, .org, .net, and country codes such as .uk or .jp. Looking up “getstream.io” would give us the addresses of the top-level domain name servers to go to.
Below the root are the aforementioned TLD DNS servers, which store information about specific domains within their assigned extension, directing queries further to the authoritative DNS servers.
Authoritative DNS servers hold the actual DNS records for a domain, such as A (Address), MX (Mail Exchange), and TXT records, responding directly to queries about the domains they manage. For example, they provide the IP address of a requested domain or details about its mail server. These servers would provide the actual IP addresses for the “getstream.io” domain.
Complementing these are Recursive DNS resolvers, which act as intermediaries between end users and the DNS infrastructure. When a user requests a website, the recursive resolver queries the necessary DNS servers (root, TLD, and authoritative) to resolve the domain name into an IP address.
DNS can also be classified by functionality: Forward DNS resolves a domain name to an IP address, enabling users to access web resources. Reverse DNS, on the other hand, maps an IP address back to a domain name, often used in email servers or security checks. Specialized DNS services, such as Dynamic DNS (DDNS), update DNS records in real-time to accommodate devices with frequently changing IP addresses, like those on dynamic IP connections. Private DNS is another category, used within organizations for resolving internal domain names that are not exposed to the public internet. Additionally, DNS servers can be categorized by their implementation: Public DNS servers (e.g., Google DNS at 8.8.8.8 or Cloudflare DNS at 1.1.1.1) are accessible to anyone on the internet, while Private or Internal DNS servers are restricted to specific networks, such as corporate or organizational environments.