A domain name is a website’s address on the internet. It helps your web browser find the web page you are looking for.
For your web browser to display a web page it needs to translate the domain name into something called an IP address.
Every device connected to the internet has an IP address. An IP address looks something like this 184.108.40.206
For your web browser to find the IP address there could be 5 different places to check:
The process of finding the IP address is called the Domain Name System (DNS) and this is how it works.
Your web browser first checks if your computer knows the answer.
Everytime you go to a website your browser will remember it’s IP address for a little bit.
If the web browser can’t find the answer locally or has forgotten the answer it will ask the resolver server (also known as the recursive DNS servers).
The resolver server is usually your internet service provider (ISP).
If the resolver doesn’t know the answer it will find the answer for you – starting with the root server.
All resolvers must know one thing: where to find a root server. Root servers are scattered around the globe and operated by 13 independent organisations.
The root server doesn’t tell the resolver where to find the IP address. Instead it tells the resolver which top level domain (TLD) server to talk to. For example if you were trying to find wikipedia.org the root would tell the resolver to check with the .org TLD server.
There are over 1,000 TLD servers. There is one for .com domains, another for .gov domains, and so on.
The TLD servers job is to tell the resolver where it can find the authoritative nameserver for the domain you are looking for.
The resolver has finally come to the right place. The authoritative nameserver knows the IP address and tells the resolver.
The resolver then tells your web browser, which then means you can see the webpage. This all happens in a few milliseconds.
At the same time the resolver remembers the IP address of the website you just went to so if anyone else asks for the same site it has the answer.
If your browser doesn’t know a websites IP address it will:
- Ask the resolver (the resolver is normally your internet provider).
- If the answer is no the resolver will find the answer by asking the root. The root will give the correct TLD server.
- The resolver asks the TLD server and gets told the correct authoritative nameserver.
- The resolver asks the authoritative nameserver and gets the domain name’s IP address.
- The resolver tells your machine the IP address and now you can see the website.
The resolver and your local machine won’t remember a domains IP address forever. Each domain name has something called a TTL (time-to-live). The TTL indicates how long until your computer, or resolver has before it should recheck with the authoritative nameserver.
Hopefully this post helped. If it still doesn’t make sense I found this website howdns.works very useful and this video also gives a good summary.