Wednesday, September 23, 2026

What Is DNS?

// networking

What Is DNS?

DNS is the system that connects human-readable domain names to the servers and services behind them. Without DNS, using the web would usually require remembering numerical network addresses instead of names such as freelancecoder.uk.

// definition

DNS means Domain Name System

DNS, or the Domain Name System, is a distributed system used to translate domain names into information that computers can use to locate internet services.

// basic idea

Domain name to server

People prefer names. Computers ultimately need network addresses and routing information.

Domain name | v DNS lookup | v IP address or another DNS destination | v Server | v Website or service

When you enter a domain into a browser, DNS helps determine where the request should be sent.

// example

A simple DNS lookup

Imagine that a browser needs to open:

www.example.com

The browser needs to determine which server or service is responsible for that hostname.

www.example.com | v DNS | v Destination | v Web server

Once the destination has been found, the browser can begin communicating with the appropriate server.

// distinction

Domain, DNS and hosting are different

Domain

The human-readable name, such as example.com.

DNS

The system that tells computers where services associated with that name can be found.

Hosting

The server or platform that stores and serves the website or application.

Website

The actual pages, files and application content that visitors interact with.

Domain | v DNS | v Hosting | v Website
// records

Common DNS record types

DNS stores different kinds of information in DNS records.

A
Maps a hostname to an IPv4 address.
AAAA
Maps a hostname to an IPv6 address.
CNAME
Makes one hostname an alias of another hostname.
MX
Identifies the mail servers responsible for receiving email for a domain.
TXT
Stores text information. TXT records are commonly used for domain verification and email-related policies.
NS
Identifies the authoritative nameservers responsible for a DNS zone.
// A record

Pointing a domain to an IPv4 address

An A record maps a hostname directly to an IPv4 address.

example.com | v A record | v 203.0.113.10

The exact IP address will depend on the server or hosting platform being used.

// CNAME

Pointing one hostname to another

A CNAME record creates an alias between hostnames.

www.example.com | v CNAME | v hosting.example.net

The DNS system can then continue resolving the destination hostname.

Important: a CNAME points to another hostname, not directly to an IP address.
// email

DNS also controls email routing

DNS is not only used for websites.

MX records tell other mail systems which servers should receive email for a domain.

person@example.com | v DNS MX lookup | v Mail server | v Mailbox system

This is why changing website hosting does not necessarily mean changing email hosting.

// nameservers

What are nameservers?

Nameservers are DNS servers responsible for providing information about domains and DNS zones.

A domain registrar may allow you to select which nameservers are authoritative for your domain.

Domain | v NS records | v Authoritative nameservers | v DNS records

Those authoritative servers contain or serve the DNS records that describe where the domain's services should go.

// hierarchy

DNS is hierarchical

Domain names are organised into levels.

www.example.com www = hostname / subdomain example = registered domain label com = top-level domain

At the very top of DNS is the DNS root.

DNS root | v .com | v example.com | v www.example.com
Terminology: people sometimes informally call example.com the "root domain", but in DNS terminology the actual DNS root is the top of the global DNS hierarchy.
// resolution

How DNS resolution works

A DNS lookup can involve several different systems.

Browser | v DNS resolver | v DNS hierarchy | v Authoritative nameserver | v DNS answer | v Browser

A recursive resolver performs or coordinates the lookup required to obtain the answer for the client.

// caching

DNS answers can be cached

DNS systems often cache previous answers so that every lookup does not have to repeat the full resolution process.

This improves speed and reduces unnecessary DNS traffic.

// TTL

What is TTL?

DNS records commonly include a value called TTL, meaning Time To Live.

TTL tells DNS caches approximately how long a record may be retained before it should be refreshed.

TTL = 3600 3600 seconds = 1 hour

A DNS change may therefore not appear everywhere immediately because some systems may still have an older answer cached.

// propagation

What does DNS propagation mean?

When people say that DNS is propagating, they usually mean that different DNS resolvers and caches are gradually replacing previously cached information with newer records.

Old DNS record | v DNS record changed | v Some caches still contain old answer | v Caches expire and refresh | v New answer becomes widely visible

The term "propagation" is convenient, although much of the delay is actually caused by caching and TTL behaviour.

// URL

DNS does not resolve an entire URL

Consider:

https://www.example.com/articles/dns

DNS is primarily concerned with the hostname:

www.example.com

The rest of the URL is handled by the web request and the server or application.

// IP

DNS and IP addresses

DNS and IP addresses solve different parts of the problem.

Concept Purpose
Domain name Human-readable name.
DNS Resolves names and provides service information.
IP address Network address used for routing traffic.
Server Handles requests and provides a service.
// practical

When would you edit DNS?

You may need to change DNS records when:

Connecting a website

Pointing a domain to Blogger, WordPress, a hosting company or another web platform.

Configuring email

Adding MX and other email-related records.

Verifying ownership

Adding a TXT or CNAME record to prove control of a domain.

Creating subdomains

Connecting names such as blog.example.com or api.example.com to services.

// mental model

A useful way to remember DNS

Domain = name DNS = directions IP address = network address Hosting = where the service runs Website = what the visitor sees

DNS acts as the connection between the name people type and the internet service that should receive the request.

// summary

Names need directions.

DNS stands for Domain Name System. It connects domain names with the servers and services behind them using records such as A, AAAA, CNAME, MX, TXT and NS. DNS is separate from the domain itself, the hosting platform and the website content, but it is the system that connects those pieces together.

What Is an IP Address?

// networking What Is an IP Address? An IP address is a numerical address used t...