DEV Community

Himanshu Kumar
Himanshu Kumar

Posted on

DNS Record Types

Have you ever thought: How does a browser know where a website lives?

When you type google.comin your browser, you are not really connecting to a name. You are connecting to a server computer somewhere in the world. As computers do not understand names.They understand numbers (IP addresses).

So how does the internet convert a name into a number?
The answer is DNS.

What is DNS?

DNS (Domain Name System) is like the phonebook of the internet. Back in the day, if you wanted to call your teacher Hitesh Sir, you had to look up his name in a physical phonebook to find his number: 97565XXXXX. DNS does the exact same thing for the web. It takes a human friendly name likeexample.comand translates it into a machine-friendly number like 191.19.13.1

  • You type a website name
  • DNS finds the IP address
  • Browser connects to that IP
  • Website loads

Why DNS Records Are Needed

A domain name is like a business. That business can have:

  • Website
  • Email service
  • Subdomains
  • Verification data

DNS records are instructions that tell the internet:

  • Where the website lives
  • Where emails should go
  • Which company controls this domain

Each record solves a different problem.

NS Record (Who Controls the Domain)

NS is Name Server and NS record tells Which DNS servers are responsible for this domain. It tells DNS resolvers which servers to contact when it's looking for DNS records for that domain name.

Real-life analogy

You buy a domain from GoDaddy and you host your website on vercel then your NS record will say "This domain is managed by vercel’s DNS servers".

Top comments (0)