Don’t know what DNS is? Do not worry most people don’t, yet we all use it every day without even realising!
The domain name system (DNS) is effectively the telephone book of the internet. If you are lucky to be young enough to not know what a physical telephone book is, think about your mobile phone contacts list and how it matches your friends names and their numbers, so you never have to remember the 11 numbers to type.
DNS is a global directory for resources on the internet that matches devices unique internet location, their numerical IP addresses, to a memorable name, their domain names.
An IP address is a unique number given to a device that is connected to the internet, it is what allows devices to communicate with one another. As human we find it hard to remember numbers between 0 and 4.3 billion for IP version 4 or even worse 0 and 340 undecillion for IP version 6.
When we access websites, rather than having to type into a browser the IP of this computer (82.219.4.38 if you are curious) to navigate to the Exa Networks website, you can use its DNS name www.exa.net.uk. The DNS infrastructure is used by your browser to tranparently translates the domain name to the IP address which then allows your browser to access this page.
The DNS therefore eliminates the need for you to even know about IP addresses, instead allowing you to search for and navigate internet resources by name.
Domains usually contain information for more than one IP address so multiple names can be associated to a domain, such as www for web sites (world wide web) or smtp for e-mail (simple mail transport protocol).
As it would be impractical for all queries to go to one place, the answer provided to a name can also be different depending on where you are asking from.
So if for example you are based in the UK and search something on Google it is highly likely that your query will be sent to a different machine than if you did the same search in America. This not only prevents congestion on the machine but also reduces the amount of time it takes to receive your response.
DNS caching
When you visit a website the information is cached, both locally on your computer, and also on the internet, which speeds up the process for the next query and means the DNS doesn’t have to find this information from scratch every time you request it.
If you’re like us then you’ll search Google multiple times a day and when you open your browser and type the Google domain name into the address bar, your device will check if you’ve visited that website previously and if so used the previously fetched information instead of re-requesting it.
Whereas, if you haven’t visited the website before then the query will then be sent to the DNS to match with the IP address.
Should you know more about DNS, the protocol is defined by a numbered technical reference document called an RFC, numbered 1035 in this case https://datatracker.ietf.org/doc/html/rfc1035 but you will probably find it easier to read wikipedia for more information.