Skip to content
Softhat IT SolutionsSofthat IT Solutions

What is Domain Name System (DNS) & DNS Server Types

What DNS is, how a DNS lookup works, the four types of DNS servers, root server facts, DNSSEC and DNS over HTTPS, and tips for managing your records.

AuthorRehmat Ullah6 min readUpdated
What is Domain Name System (DNS) & DNS Server Types

The Domain Name System (DNS) is a fundamental part of the internet. It works like the internet's phonebook, translating human-friendly domain names into the IP addresses that computers use to find each other.

Understanding how DNS works, and the different types of DNS servers, helps you keep your website reachable, fast and secure. In this article, we explain what DNS is, how a lookup works, the main server types, and newer privacy protections such as DNS over HTTPS.

What is Domain Name System (DNS)?

1. Definition:

  • The Domain Name System (DNS) is a hierarchical and decentralized naming system for computers, services and other resources connected to the internet or a private network. It translates domain names (like www.example.com) into numerical IP addresses (like 192.0.2.1) needed to locate services and devices.

2. Key Characteristics:

  • Hierarchical Structure: DNS is organized as a tree, starting from the root, followed by top-level domains (TLDs such as .com or .pk), second-level domains and subdomains.
  • Decentralized Database: No single server holds all DNS data. Responsibility is delegated to many organizations and distributed across DNS servers worldwide.
  • Caching: Answers are stored temporarily for a set time, called TTL (time to live). Caching makes repeat lookups fast, but it also explains why DNS changes can take time to appear everywhere.

How Does DNS Work?

1. Domain Name Resolution:

  • When a user types a domain name into their browser, the DNS resolution process begins to find the matching IP address. This usually takes milliseconds.

2. Steps in DNS Resolution:

  • Step 1: Query Initiation: The browser and operating system check their own cache, then send a DNS query to a recursive resolver (often run by your internet provider, or a public resolver you have chosen).
  • Step 2: Recursive Query: If the resolver doesn't have the answer cached, it looks it up on the user's behalf by asking other DNS servers.
  • Step 3: Root Server Query: The resolver asks a root DNS server, which responds with the address of the right TLD server.
  • Step 4: TLD Server Query: The resolver asks the TLD server, which responds with the authoritative DNS servers for the requested domain.
  • Step 5: Authoritative DNS Server Query: The resolver asks the authoritative server, which returns the IP address for the domain.
  • Step 6: IP Address Return: The resolver caches the answer and returns the IP address to the browser, which can then connect and load the website.

Types of DNS Servers

1. Recursive DNS Servers:

  • Function: These servers (also called resolvers) receive DNS queries from devices and perform the full lookup, querying other DNS servers as needed.
  • Role: They act as intermediaries between users and authoritative DNS servers, and cache answers to speed up future lookups.

2. Root DNS Servers:

  • Function: Root servers are the starting point of the DNS hierarchy. They point resolvers to the right TLD servers.
  • Role: There are 13 root server identities (named A to M), run by 12 independent operators. Each identity is served by many copies around the world using a technique called anycast. As of 16 September 2026, root-servers.org listed 2,045 root server instances in total, which is why "13 root servers" does not mean 13 physical machines.

3. Top-Level Domain (TLD) DNS Servers:

  • Function: These servers hold information about the authoritative DNS servers for domains within a top-level domain, such as .com, .org, .net or the country code .pk.
  • Role: They direct queries to the right authoritative DNS servers. For example, .pk domains are managed by PKNIC, the .pk registry.

4. Authoritative DNS Servers:

  • Function: Authoritative servers store the DNS records for specific domains and answer queries about them.
  • Role: They are the definitive source for a domain's records. When you edit DNS settings at your registrar, hosting provider or CDN, you are changing records on its authoritative servers.

Common DNS Record Types

  • A and AAAA records: Point a domain to an IPv4 or IPv6 address.
  • CNAME record: Points one name to another name, for example www to your main domain or a CDN hostname.
  • MX records: Tell other mail servers where to deliver email for your domain.
  • TXT records: Hold text data, used for domain verification and email authentication such as SPF, DKIM and DMARC.
  • NS records: List the authoritative name servers for the domain.

Importance of DNS

1. Website Accessibility:

  • DNS lets users reach websites with memorable domain names instead of numerical IP addresses. If DNS fails, your site and often your email appear to be down, even if the server is fine.

2. Load Distribution:

  • DNS can return different IP addresses to different users, spreading traffic across servers or sending users to a nearby CDN location.

3. Redundancy and Reliability:

  • The distributed design of DNS, with multiple name servers per domain, keeps resolution working even when one server has problems.

4. Security Enhancements:

  • DNSSEC (DNS Security Extensions) adds digital signatures to DNS records, so resolvers can detect forged answers and protect users against attacks such as DNS spoofing and cache poisoning.

DNS Privacy: DNS over HTTPS

Traditional DNS queries are sent unencrypted. Anyone on the network path, such as a public Wi-Fi operator, can see which domains a user looks up, and in some cases tamper with the answers.

DNS over HTTPS (DoH), standardized in RFC 8484, sends DNS queries inside encrypted HTTPS connections. A related standard, DNS over TLS (DoT), encrypts DNS on a dedicated port. Modern browsers and operating systems let users turn on encrypted DNS in their settings.

Note the difference: DNSSEC proves an answer is authentic, while DoH and DoT keep the query private in transit. They solve different problems and work well together.

DNS Management Tips for Website Owners

  • Lower the TTL before a migration: A day or two before moving hosts, reduce the TTL on the records you will change, so the switch takes effect faster.
  • Protect your registrar account: Use a strong password and two-factor authentication. Whoever controls your DNS controls your website and email.
  • Keep records tidy: Remove records pointing to old servers or services you no longer use. Forgotten records can be abused.
  • Set up email authentication: Add correct SPF, DKIM and DMARC records so your business emails reach inboxes.

Conclusion

The Domain Name System is a crucial part of the internet's infrastructure. It connects domain names to servers through a chain of recursive, root, TLD and authoritative servers, with caching keeping it fast.

Whether you run a business website or manage IT, a solid grasp of DNS helps you avoid downtime, move hosts safely and keep your domain secure with DNSSEC, encrypted DNS and good account hygiene.

Enhance Your Website's Performance with Our DNS Solutions!

Softhat sets up domains, DNS, CDN and email records correctly for websites across Pakistan, so launches and migrations happen without downtime. Explore our web development services, or book a free strategy call to review your DNS setup.

Share this article

Ready to grow your business digitally?

Websites, SEO, social media and AI automation. Tell us what you need and we'll send a clear plan.

اردو