What is DNS?
How It Works, Records and Security

DNS (Domain Name System) is the internet's phone book. It turns website names that people can read, like example.com, into the number addresses that computers use to find each other. So when you type a name, it finds the right address in a moment and your browser connects.

Short Answer DNS, short for Domain Name System, is the internet’s phone book. It turns a name people can read, like example.com, into the number address a computer needs. That number is called an IP address. So when you type a website name, this system finds the right address in a split second, and your browser connects to it.

What is DNS?

Every computer, phone and server on a network has a number address, called an IP address. For example, a website might sit at 192.0.2.10. Numbers like this are hard to remember, so people use names instead. DNS is the system that links each name to its number.

Think of the contacts list on your phone. You tap “Priya” and the phone dials her number for you. In the same way, you type a website name and the Domain Name System looks up the matching IP address. You never see the number, but your computer uses it to connect.

In computer networks, the same idea works inside an office too. For example, staff in a Chennai office may open “hr.company.local” to reach the HR portal. An internal name server, run by the IT team, answers that lookup. As a result, nobody has to remember server numbers, and IT can move a server to a new address without telling every user.

Key Words to Know

  • Domain name: the readable name of a website or service, such as example.com.
  • IP address: the number address of a device on a network.
  • Name server: a computer that stores names and their addresses and answers questions about them.
  • Resolver: the helper server that does the searching on your behalf.
  • Cache: a short-term memory of recent answers, so the same question does not need a full search again.

How Does DNS Work?

A lookup, the act of asking for the address behind a name, feels instant to the user. Behind the scenes, though, several servers pass the question along until one of them knows the answer. Here is what happens when you type www.example.com into your browser:

  1. Check memory: first, your computer checks its own cache. If it looked up this name a few minutes ago, it reuses that answer.
  2. Ask the resolver: if not, it asks a resolver. Usually your office IT team or your internet provider runs it.
  3. Ask a root server: the resolver then asks a root name server. The root server does not know the address, but it knows who handles “.com”.
  4. Ask the TLD server: next, the resolver asks the server for the ending “.com”. This is called a top-level domain (TLD) server. It points to the name server that holds the records for example.com.
  5. Ask the authoritative server: finally, the resolver asks the server that holds the official records for example.com. It gives the real answer, the IP address.
  6. Save and connect: the resolver passes the address to your computer and keeps a copy in its cache. Then your browser connects to the website.

Because of caching, most lookups skip steps 3 to 5. In fact, a busy office resolver already knows the popular names, so the answer comes back almost at once.

A laptop asks a resolver, which asks root, .com and owner servers in turn, then connects to the website
The resolver does the searching, and its cache means most lookups skip the middle steps.

Types of DNS Servers

A DNS server is any computer that answers name lookups or helps find the answer. Four kinds of servers share the work. Each one knows only its own part, which keeps the whole system fast and spread out around the world.

  • Recursive resolver: the server that takes your question and keeps asking others until it gets an answer. It also stores answers in its cache.
  • Root name server: the starting point at the top of the system. It points to the right server for each ending, such as .com, .org or .in.
  • TLD name server: TLD means top-level domain, the last part of a name, like .com or .in. This server knows where each domain under that ending is managed.
  • Authoritative name server: the server that holds the official records for a domain. Its answer is the final one.

For example, when a company moves its website to AWS or Azure, it changes the records on its authoritative server. After that, resolvers everywhere slowly pick up the new address.

DNS Records Explained

A domain’s settings live in small entries called records. Each record type does one job. The table below shows the ones an office team meets most often.

Record What It Does Plain Example
A Points a name to an IPv4 address (the common number format) example.com goes to 192.0.2.10
AAAA Points a name to an IPv6 address (the newer, longer format) example.com goes to 2001:db8::10
CNAME Makes one name a nickname for another name shop.example.com uses the address of store.example.com
MX Tells other mail systems where to deliver email for the domain Mail for @example.com goes to the company’s mail server
TXT Holds short text notes, often used to prove ownership or set email rules A line that lists which servers may send email for the domain
NS Names the authoritative servers for the domain ns1.example.net and ns2.example.net hold the records for example.com

Every record also has a TTL, or time to live. It tells resolvers how many seconds they may keep the answer in cache before they ask again.

TXT records also carry three email safety checks: SPF, DKIM and DMARC. They help other mail systems spot fake emails that pretend to come from your domain. Our page on email spoofing explains how they stop that trick.

What is DNS Propagation?

When you change a record, resolvers around the world still hold the old answer in their cache until its TTL runs out. People call this gap propagation. How long it lasts depends on the TTL, which can be a few minutes, a few hours or a full day. Therefore, IT teams often lower the TTL a day before a planned move, so the change spreads faster.

DNS Port Number and Protocols

A port is like a numbered door on a server, so different services do not mix. The name system uses port 53. Most questions travel over UDP, a quick way of sending small messages without setting up a connection first. However, large answers, and full copies of a domain’s records sent from one server to another, use TCP, a slower but more careful method. So both UDP and TCP on port 53 need to stay open for name servers to work properly.

Normal lookups travel as plain text, so anyone on the same network path could read them. To fix this, DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt the questions. This is the same kind of scrambling that protects online banking. DoH uses the normal web port 443, while DoT uses its own port, 853.

DNS vs DHCP and IP Address

People often mix up these three terms because they work together every time a laptop joins the office Wi-Fi. In short, the IP address is the number, DHCP hands out the number and DNS finds the number behind a name.

Question IP Address DHCP DNS
What is it? A number address for a device Dynamic Host Configuration Protocol, a service that gives out addresses The system that matches names to addresses
Main job Identify where a device is Give each new device an address and network settings Turn a name into an address
Office example Your laptop gets 10.0.5.24 The office router gives your laptop that address when you connect Your laptop asks where the HR portal is
How they link Used by both Also tells your laptop which name server to use Needs the address of a working resolver

Common Problems and First Checks

When a lookup fails, the website itself may be fine, but your computer cannot find its address. Browsers then show errors such as “server not found”. One common message is DNS_PROBE_FINISHED_NXDOMAIN. NXDOMAIN simply means “this name does not exist”, so the resolver found no record for it.

An Example From a Bengaluru Office

For example, an accounts executive in Bengaluru cannot open the billing portal, but colleagues can. First, she checks the spelling of the address, because a typo is the most common cause. Next, she tries another website to see if the internet works at all. Then the IT team clears her saved answers. On Microsoft Windows, the command ipconfig /flushdns empties the local cache. Finally, if the problem affects everyone, IT checks whether the office resolver is down or someone changed a record by mistake.

On Windows, IT can also run the built-in nslookup command. It shows which server answered a DNS lookup and what it said.

Talk to an ExpertDo name lookups fail across your offices? Talk to our team about DNS and network design.

DNS Security

Almost every email, website visit and cloud app starts with a name lookup. As a result, attackers target the name system to send people to the wrong place or to knock services offline. Good network security treats name lookups as a key part of the network that needs its own protection.

Main Threats

  • Spoofing and cache poisoning: an attacker slips a false answer into a resolver’s cache. Users who type the right name then land on a fake site, often built for phishing.
  • Hijacking: an attacker steals the login for the account that manages a company’s records and points them somewhere else. In 2019, CISA, the US cybersecurity agency, warned US government offices about this. Its advice fits any company: check your records, change the passwords and add a second sign-in step.
  • Flooding attacks: a DDoS attack sends a huge wave of fake lookups to a name server, so real users get no answer.
Name lookup path from office user to resolver and owner server, showing three attacks and the defense for each
Each part of the lookup path needs its own protection, from encrypted questions to signed records and locked admin accounts.

Ways to Protect Name Lookups

Several defenses work together. First, DNSSEC (DNS Security Extensions) adds digital signatures to records. A signature works like a seal. It lets a resolver check that an answer came from the domain owner and was not changed on the way. It proves the answer is genuine, but it does not hide it, so encrypted lookups still help.

Second, DNS filtering blocks lookups for known harmful or unwanted sites, before the browser ever connects. It works like URL filtering, but at the name stage. Also, a firewall can block lookups sent to outside resolvers, so devices use the company’s own resolver.

In the cloud, Amazon Route 53 and Azure DNS host company domains and support DNSSEC signing for public domains. They also offer DNS Firewall in Route 53 VPC Resolver and Azure DNS Resolver Policy, which filter lookups made inside cloud networks. Our Amazon Route 53 Guide covers routing policies and security in more detail.

Frequently Asked Questions About DNS

What is the full form of DNS?

DNS stands for Domain Name System. It is the naming system of the internet and of most company networks. It matches readable names, such as example.com, to the number addresses that computers use to find each other. Without it, people would need to remember long strings of numbers for every website, mail server and office app they use.

What is an example of the domain name system?

Suppose a sales manager in Mumbai types the company’s web address into a browser. First, the laptop asks the office resolver for the address. The resolver checks its cache, then asks the root, .com and company servers in turn. It gets back the server’s IP address, and the website opens. Because the resolver saves the answer, the next visit skips most of these steps.

What is a DNS issue?

A DNS issue means your device cannot turn a name into an address, even though the internet may be working. Common causes are a typo in the address, an old saved answer, a resolver that is down or a wrong record. So the browser shows a “server not found” error. Clearing the local cache or switching networks often shows where the fault is.

What is DNS in mobile phones?

On a phone, it works the same way as on a laptop. The phone asks a resolver for the address of every app server and website it uses. Usually, the Wi-Fi router or mobile network chooses that resolver. Some phones also have a “Private DNS” setting. It sends lookups to a chosen resolver over an encrypted link, so others on the network cannot read them.

What is the difference between DNS and a VPN?

They do different jobs. The name system only finds the address behind a name. A virtual private network (VPN), in contrast, builds an encrypted tunnel for all your traffic, for example from home to the office network. A VPN often tells your device to use the office resolver, so internal names like the HR portal still work while you are away.

How is the domain name system used in cyber security?

Security teams watch name lookups closely, because most attacks make lookups at some stage. For example, harmful software often looks up the attacker’s server name before it connects. So blocking known bad names stops many attacks early. Lookup logs also help investigators see which devices contacted suspicious sites. In addition, signed records and protected admin accounts stop attackers from changing a company’s records.

What does the domain name system do in a computer?

Inside a computer, a small built-in service handles name lookups for every program. When an app needs a server, this service first checks its local cache and a small file of fixed names. If it finds nothing, it asks the resolver set by the network. Then it saves the answer for a short time, so the next request is faster.
Our SolutionEnterprise Networking and Multi-Site Connectivity

References

  1. How names, records, TTL and port 53 work: IETF, RFC 1035: Domain Names, Implementation and Specification
  2. Encrypted lookups over HTTPS: IETF, RFC 8484: DNS Queries over HTTPS (DoH)
  3. Hijacking and how to prevent it: CISA, Emergency Directive 19-01: Mitigate DNS Infrastructure Tampering (2019, now closed)
Stay Updated

Get the Latest Terms & Insights.

New encyclopedia terms, threat intelligence, and architecture decisions, by email.

Book a Consultation

A practice principal will contact you within 1 business day.

Thank you! A Signisys principal will be in touch within 1 business day.