Skip to content
How DNS works

What is DNS?

Every website lives at an IP address, a string of numbers that computers use to find each other. People are bad at remembering numbers, so we use names like techpp.com instead.

DNS, the Domain Name System, is the internet's address book that turns those names back into numbers. Every time you open a new site, your device quietly looks its name up before it can connect.

The lookup usually takes a few milliseconds, and it is shared between a handful of servers around the world, each of which knows just one part of the answer.

Here is the whole thing in one loop. Your device asks for the address, gets a number back, and only then connects to the website.

How DNS works

Step by step

1

Your device asks a resolver

When you type techpp.com, your device first checks whether it already has the answer saved. If not, it asks a DNS resolver, usually run by your ISP or by a public service like Cloudflare's 1.1.1.1 or Google's 8.8.8.8.

2

A root server points the way

If the resolver does not have the answer saved either, it starts at the top with a root server. The root server does not know techpp.com, but it knows which servers are in charge of every name that ends in .com.

3

The .com servers narrow it down

The resolver then asks the .com servers. They do not know the address either, but they know which name server holds the records for techpp.com.

4

The site's own name server answers

Finally the resolver asks techpp.com's own name server. This one holds the official record, so it replies with the actual IP address.

5

Your device gets the answer and connects

The resolver hands the address back to your device, and both keep a copy for a while, so the next visit skips the whole trip. Only now does your browser actually connect to the website, and the whole lookup usually took a few milliseconds.

Who can see your lookups

Plain DNS vs encrypted DNS

Ordinary DNS lookups travel as plain text, so anyone on the network can read them and, in theory, tamper with the answers. Encrypted DNS, known as DNS over HTTPS or DNS over TLS, wraps them up. Tap the laptop to compare.

Plain DNSTap the laptop to turn on encrypted DNSYour Wi-Fi & ISPSee every nameyou look upYour DNS resolverSees every nameyou look upOthers on public Wi-FiCould read orfake the answers
Words you will see

The DNS terms worth knowing

Domain name
The human-friendly name of a site, like techpp.com.
IP address
The number computers actually use to find each other, like 203.0.113.80.
DNS resolver
The server that does the legwork of looking a name up for you, and remembers the answer for next time.
Name server
A server that holds the official records for a domain and has the final say on its address.
TTL
Short for time to live. It tells resolvers and devices how long they may keep an answer before asking again.
DNS over HTTPS
A way of sending lookups inside an encrypted connection, so your network cannot read or change them.
Important limits

What changing your DNS can and cannot do

Changing your DNS can

  • Make lookups a little faster
  • Block known malware and ad domains, with a filtering resolver
  • Hide your lookups from your ISP, when it is encrypted

Changing your DNS cannot

  • Hide the sites you visit from your ISP entirely, since it still sees the addresses you connect to
  • Make you anonymous
  • Speed up your downloads or streaming
In short

DNS is the internet's address book. Your device asks a resolver, the resolver works its way from a root server to the site's own name server, and the answer is saved so the next lookup is instant. It happens before every new site you open, which is why a faster or more private DNS service is one of the simplest upgrades you can make.

Was this article helpful?

Comments

0

Share your thoughts, questions, or feedback about this guide.

Leave a Comment

0/2000