01

A name is not an address

Computers on the internet find each other by numeric IP addresses, strings such as 203.0.113.10 or much longer IPv6 equivalents. People prefer names like a news site or a bank. The Domain Name System, or DNS, is the service that links the two. Before your browser can request a page, it must learn which address belongs to the name you typed. DNS also lets organisations move a website to new servers without telling anyone: they simply update the record, and the name keeps working. It was designed in 1983 to replace a single shared file that listed every host on the early network.

02

Reading a name right to left

DNS is a hierarchy, and a name is read from right to left. Take shop.example.ae. At the top sits the invisible root. Below it is the top-level domain, here .ae, the country code for the UAE, run by a national registry. Below that is example.ae, a domain someone has registered, whose owner controls its own name servers. Below that is shop, a label the owner can create freely. No single server knows every address. Instead, each level knows only who is responsible for the level beneath it. This division of labour is what has allowed DNS to grow from a few thousand names to hundreds of millions without collapsing under its own weight.

03

The chain of lookups

When your phone needs an address, it asks a recursive resolver, usually run by your internet provider or by a public service. If the resolver has no saved answer, it starts at the top. A root server replies, in effect, that it does not know the address but knows who handles .ae. The .ae servers reply with the name servers for example.ae. Those servers finally give the actual address for shop.example.ae. The resolver passes it back to your phone, which can now open a connection. Each step is a tiny message, so even the full chain usually finishes in well under a second.

04

Why caching makes it fast

Every DNS record carries a time to live, a number of seconds for which the answer may be reused. Resolvers, operating systems and browsers all keep copies until that timer runs out. Suppose a full lookup needs four round trips of about 20 milliseconds each: the first visitor waits roughly 80 milliseconds for the address. The next thousand people using the same resolver get the saved answer almost instantly. Popular names are therefore nearly always cached nearby, and the root servers handle a surprisingly small share of daily queries. Caching has a cost too: when a site changes its address, some users may keep reaching the old one until their copies expire.

05

What DNS does not protect

Traditional DNS messages travel unencrypted, so anyone on the path, such as a café network, can see which names you look up, even if the website itself uses encryption. Newer methods, DNS over HTTPS and DNS over TLS, wrap queries in encryption, and many browsers now offer them. A separate system, DNSSEC, adds digital signatures so a resolver can check that answers have not been forged. Forged answers are a real risk: an attacker who poisons a resolver's cache can quietly send users to a fake site. Another common misunderstanding is that DNS carries web traffic. It does not. It only supplies the address; the page itself travels over a separate connection.

06

When the address book fails

Because almost everything online starts with a name, DNS failures look like the whole internet breaking. In 2016 a large attack on Dyn, a company providing DNS for many well-known websites, left those sites unreachable for parts of a day, even though their own servers were running normally. Misconfigured records have caused similar outages at major companies since. This is why organisations spread their name servers across several providers and locations, and why the root itself is copied to well over a thousand sites worldwide. When a website will not load but others do, the problem is often not the site at all, but the lookup that should have found it.

FOLLOW THE EVIDENCE

Sources & further reading

Figures are rounded and widely published; check the linked organisations for the latest editions. These organisations do not endorse this website.