Skip to main content

CompTIA A+View full course outline

Domain Name System (DNS)(OBJ.2.3)

By Jonathon Eades Founder & IT InstructorUpdated

7 min read

The Domain Name System (DNS) is one of the most fundamental services on the internet and in modern networking. Often described as the "phonebook of the internet," DNS translates human-readable domain names (like www.example.com) into IP addresses (like 192.168.1.1 or 2001:db8::1) that computers use to identify each other on networks.

Without DNS, users would need to memorize numerical IP addresses for every website they wanted to visit. DNS makes the internet accessible and user-friendly by allowing people to use memorable names instead of complex numbers.

Why DNS Matters for IT Professionals

Understanding DNS is critical for several reasons. First, DNS issues are among the most common causes of network connectivity problems. Second, proper DNS configuration is essential for network security. Third, many enterprise services depend on DNS for proper functioning, including email, Active Directory, and web services. Finally, DNS troubleshooting is a core competency tested on the CompTIA A+ exam.

How DNS Works

When you type a domain name into your browser, a series of queries occurs behind the scenes to resolve that name to an IP address. This process is called DNS resolution.

The DNS Resolution Process

The DNS resolution process follows these steps:

  1. Local Cache Check: Your computer first checks its local DNS cache to see if it has recently resolved this domain name.
  2. Hosts File Check: If not in cache, the system checks the local hosts file for a static mapping.
  3. Recursive Resolver Query: If still unresolved, the query goes to a recursive DNS resolver (typically provided by your ISP or a service like Google DNS or Cloudflare).
  4. Root Server Query: The resolver queries a root DNS server, which directs it to the appropriate TLD server.
  5. TLD Server Query: The Top-Level Domain server (like .com or .org) directs the resolver to the authoritative name server.
  6. Authoritative Server Response: The authoritative name server returns the IP address, which is then cached and returned to your computer.

The DNS resolution process in six numbered steps. A user's computer checks its local cache, then the hosts file, then queries a recursive resolver such as an ISP, Google or Cloudflare resolver. The resolver queries a root server, which directs it to the TLD server, which directs it to the authoritative server that returns the IP address. The resolver caches the result and returns the address to the user.

The DNS Hierarchy

DNS operates as a hierarchical, distributed database. This hierarchy consists of several levels:

  1. Root Level: The root zone, represented by a dot (.), contains information about all top-level domains. There are 13 root server clusters worldwide.
  2. Top-Level Domains (TLDs): These include generic TLDs (.com, .org, .net, .edu, .gov) and country-code TLDs (.uk, .de, .jp).
  3. Second-Level Domains: These are the names organizations register, such as "google" in google.com or "microsoft" in microsoft.com.
  4. Subdomains: Additional levels like "www" or "mail" that organizations create under their domain (www.example.com, mail.example.com).

The DNS hierarchy shown as a tree. At the top is the root level served by 13 root server clusters worldwide. Below it are generic top-level domains such as .com, .org, .net, .edu and .gov alongside country-code TLDs such as .uk, .de and .jp. Second-level domains such as Google, Microsoft and BBC sit beneath those, each with subdomains like www, mail, support and news.

DNS Record Types

DNS servers store various types of records, each serving a specific purpose.

Reference table of DNS record types. A maps a hostname to an IPv4 address, AAAA to an IPv6 address, MX specifies mail servers with priority values, CNAME creates an alias to another domain, TXT stores text data used for SPF and DKIM, PTR maps an IP address back to a hostname for reverse lookups, NS identifies authoritative name servers, SOA holds zone information, and SRV defines the location of specific services such as those used by Active Directory.

RecordPurposeExample Use
AMaps a hostname to an IPv4 addresswww.example.com → 93.184.216.34
AAAAMaps a hostname to an IPv6 addresswww.example.com → 2606:2800:220:1::1
CNAMECreates an alias pointing one name to anotherblog.example.com → example.wordpress.com
MXIdentifies the mail servers for a domain, with priority valuesexample.com mail delivered to mail1.example.com
TXTStores arbitrary text, often for verification and email securitySPF, DKIM, and DMARC policies; domain ownership proof

Configuring DNS Settings

DNS settings can be configured automatically via DHCP or manually.

This lesson is part of ExamWizardz Pro

Unlock every lesson, unlimited practice tests, and the AI tutor.

See Pro pricing

or start with a free account

Test yourself on this topic: free DNS, DHCP, VLANs, and VPNs practice questions — no account needed.