Skip to content
GetITechSkills

Computing and Networks

What Is DNS and Why Does It Matter?

Beginner · Concept · 6 min read · Updated October 30, 2026

You probably know a few phone numbers by heart, but you do not dial most of the people you call. You tap a name in your contacts, and the phone finds the number for you. The internet works the same way. Computers reach each other by numbers called IP addresses, yet people prefer names like example.com. Something must turn one into the other.

That something is the Domain Name System, or DNS. This entry covers only that job: how a name is looked up and turned into an address. It does not follow the whole trip of a web page, which is the subject of a separate entry on what happens when you open a web page.

What DNS is for

Every device on the internet is reached through an address. The format of those numbers is explained in what an IP address is. Numbers are hard for people to remember, and they can change. A company may move its website to a new server and get a new address, but the name can stay the same.

DNS is a worldwide, shared directory. You give it a name, and it answers with the address (or other facts) stored for that name. It is often compared to a phone book, though a better comparison is the contacts list on your phone, because the entries are updated all the time and no single person keeps the whole list.

How a domain name is built

A domain name is made of parts called labels, separated by dots, and it is read from right to left in order of importance.

Take www.example.com:

Part Name Meaning
com Top-level domain (TLD) The broadest group, such as com, org or a country code
example Second-level domain The name registered by an owner
www Subdomain A section the owner creates under the registered name

This layout forms an upside-down tree. At the top is the root, below it the top-level domains, below those the registered names, and so on. Each level is managed by a different party, and that division of work is what lets DNS serve the entire world without any one central list.

You do not buy a domain name forever. You pay a company called a registrar for the right to use it for a period, and you can renew that right.

How a DNS lookup works

No one server knows every name. Instead, servers know who to ask next. Suppose your laptop wants the address for www.example.com.

The steps

  1. Your device checks its own memory. The operating system and the browser both keep recent answers. If the answer is there, the process stops.
  2. It asks a recursive resolver. This is a DNS server, usually run by your internet provider or by a public DNS service, that does the searching for you. Your router normally forwards the question there.
  3. The resolver asks a root server. The root does not know the address, but it knows which servers handle com and points the resolver to them.
  4. The resolver asks the com servers. They do not know the address either, but they know which servers are in charge of example.com.
  5. The resolver asks those servers. These are the authoritative name servers for the domain. They hold the real record and give the final answer: the address.
  6. The answer returns to you. The resolver passes it to your laptop and remembers it for later.

The whole exchange usually takes a tiny fraction of a second. The idea is a chain of referrals, like asking at the front desk of a big building, who points you to a floor, then to a room, then to a person.

Caching and TTL

If every lookup went all the way to the root, DNS would be slow and overloaded. So answers are cached, which means saved for reuse. Every record has a TTL (time to live), a time limit set by the domain's owner that says how long others may keep the answer.

This is why a change to a domain can seem to spread slowly. Until old cached copies expire, some people still get the old address. People often call this "DNS propagation", although what really happens is that caches expire at different times.

What DNS records contain

The entries stored for a name are called records, and each type holds a different kind of fact. A few appear all the time:

Record Holds Used for
A An IPv4 address Pointing a name to a server
AAAA An IPv6 address The same, for the newer address format
CNAME Another name Making one name an alias of another
MX A mail server name Telling the world where to deliver email for the domain
TXT Free text Proving ownership and publishing email settings

So DNS is not only about websites. Email delivery depends on it too, which is why a wrong DNS entry can break email even when the website works fine.

Try a lookup yourself

The nslookup command asks a DNS server for a name. It exists on Windows, macOS and Linux, and it only reads information, so it is safe to run. Type this in a terminal or command prompt:

nslookup www.example.com

The result looks roughly like this. The numbers below are made up for the example, and your own output will differ.

Server:   router.home
Address:  192.168.1.1

Non-authoritative answer:
Name:     www.example.com
Address:  192.0.2.10

The first two lines show which DNS server answered, here a home router. "Non-authoritative" means the answer came from a resolver and not from the domain's own authoritative servers. The resolver may have saved it from an earlier lookup. The layout differs a little by system, and on some Linux systems nslookup has to be installed first. The last two lines are the answer. If you are new to terminals, the entry on command line basics explains how to open one.

Why DNS matters

DNS sits at the start of almost everything you do online. That makes it important in several ways:

  • Reliability. If DNS fails, sites appear to be down even though their servers are running. Many "the internet is broken" moments are really DNS trouble.
  • Speed. A fast, nearby resolver shortens the wait before a page even begins to load.
  • Security. Because DNS decides where a name leads, attackers sometimes try to send people to fake addresses. Keeping devices and routers updated helps.
  • Flexibility. Owners can move a site to a new server and keep the same name.

The broader view of how these pieces connect is in how the internet works.

Common mistakes

  • Confusing the domain name with the address. The name is a label for people. The IP address is what computers use.
  • Expecting changes to appear instantly. Cached answers last until their TTL ends, so give a change time to spread.
  • Assuming "can't find server" means the site is gone. The server may be fine while DNS fails. Try a different network or resolver before concluding.
  • Using the registrar and the DNS host as if they were always the same. The company where you bought a name may not be the one that serves its records.
  • Editing records without writing down the old values. A small typo in a record can take a site or email offline, so keep a copy of what was there.

FAQ

Is DNS the same as an IP address?

No. An IP address is a number that locates a device. DNS is the system that finds the number for a given name.

Who runs DNS?

No single company. Responsibility is shared: root, top-level domain and individual domain operators each manage their level, and resolvers are run by providers, companies and public services.

Why would I change my DNS server?

Some people switch to a public resolver for speed, filtering features or reliability. It is a choice, not a requirement, and the default from your provider works for most people.

What does "DNS server not responding" mean?

Your device asked for an address and got no answer in time. Common causes include a lost connection, a problem at the router or a resolver that is down. Restarting the router or checking another device is a good first step.

Can DNS be used for more than websites?

Yes. Email, services inside company networks and many apps use DNS to find the right server. More related topics are in the Computing and Networks area.

Sources

  1. RFC 1034: Domain Names - Concepts and Facilities (opens in a new tab) — IETF (RFC Editor). Describes the domain name tree, name servers and resolvers
  2. RFC 1035: Domain Names - Implementation and Specification (opens in a new tab) — IETF (RFC Editor)
  3. RFC 3596: DNS Extensions to Support IP Version 6 (opens in a new tab) — IETF (RFC Editor). Defines the AAAA record for IPv6 addresses
  4. What is a Domain Name? (opens in a new tab) — MDN Web Docs (Mozilla). A beginner explanation of domain names and how a lookup proceeds

Next in Computing and Networks: What Happens When You Open a Web Page: HTTP and HTTPS

  • Computing and Networks

    What Is an IP Address?

    An IP address is the number that lets devices find each other on a network. Learn IPv4 and IPv6, public and private addresses, and how to find yours.

    • Beginner
    • Concept
    • 7 min read

    Updated October 30, 2026

  • Computing and Networks

    How the Internet Works: From Your Device to a Website

    See the big picture of the internet: networks joined together, providers, packets, routers and servers, and how data travels from your device to a website.

    • Beginner
    • Concept
    • 6 min read

    Updated October 30, 2026

  • Computing and Networks

    What Happens When You Open a Web Page: HTTP and HTTPS

    Follow a web page from the moment you press Enter: the URL, the HTTPS connection, the request and response, status codes and how the browser builds the page.

    • Intermediate
    • Concept
    • 6 min read

    Updated October 30, 2026