A common question pops up here at Digital Pacific and that is; “What is the difference between NS and DNS records?” For many people, they (quite understandably) weren’t aware that they were two different things at all.
NS, or Name Server records, are the top-most records attached to your domain. When a person types in your domain to either visit your website or send you an email, the first thing your computer does is look up what your domain’s NS records are.
NS records are public and are stored/replicated across many locations all over the world.Once your computer knows the NS records for your website, it follows the trail and asks the first NS record “Where can I find all of the DNS records for “X” domain?”
While DNS (or Domain Name System) records are also public, they are only stored in one specific location.The NS record then responds and tells your computer, “You’ll find the DNS records for that domain on “X” server.”
Your computer then continues on the trail and asks the DNS records for the final destination of whatever it may be looking for, such as which server to deliver an email to, or which server to find the website on.
The analogy below breaks down how NS/DNS differs by comparing it to a real life scenario:
Say you wanted to read a particular book:
1. You decide you want to read a particular book.
2. You go to the library.
3. You approach the library receptionist and ask them, “I need to find a booked called “X”, where should I look first?”
4. The receptionist then checks their notes before telling you, “If you use the computer in aisle 5 to look up this book, it will tell you the exact section where the book is.”
5. You then go to aisle 5 and use the computer to look up your book.
6. The computer tells you “You’ll find book “X” in section 46.”
7. You then go to section 46 and find your book.
Now say you wanted to read a particular website:
1. You decide you want to read a particular website.
2. You go to your web browser.
3. You type the website you want into the address bar. Your browser then checks what the NS records are for the website you’ve asked for.
4. Your browser then asks the NS where all the DNS records for your domain can be found. The NS comes back and tells you, “You’ll find the DNS records on the server with the IP address of 111.22.333.4.”
5. Your browser then asks server 111.22.333.4, “I’m looking for “X” website, where can I find it?”
6. DNS then tells you, “You’ll find the website on server 100.20.300.4.”
7. Your browser then takes you to the website.
The reason there are 2 levels to finding where a website can be located, is because it allows you to split up the different services associated with your domain, into different servers.
Having what could be described as parent records (NS records) that lead you to all of the child records (DNS records) means computer can ask where to find all the different things it may be looking for, such as asking where to find a website, or which server it should send an email to, or which server it might find a subdomain on.
All of these locations could be totally different depending on how and where you store everything, so NS records point you to the one location where all of the many (possibly different) DNS records are all stored. The DNS records are then a much larger list of records that can tell you where all the different services (website, email, subdomains etc) can be found for the domain in question.
(Credit: Images use some graphics from both piktochart.com and flaticon.com)