Initially we must be familiar with a few key words -
Domain Name - the human-friendly address for the website on the internet. think of it as street address of your home. (e.g. google.com)
IP address - the actual address of the website on the internet. think of it as Latitude and Longitude of your house. (e.g. 142.250.193.238)
Introduction
The modern Internet has a major part known as Websites. These website are hosted on a server somewhere on the internet. We access these websites using their domain name, these domains names are linked to an IP address, which helps to locate the server on the internet. in this article we will understand how this domain name and IP address are related.
What is DNS ?
Think of DNS as a phonebook. like your phonebook saves the number corresponding to a persons name, the DNS Server saves the IP address of a website corresponding to its domain name. DNS Server has record of which domain is linked to which IP address.
How DNS works?
There are 4 types of DNS servers involved in working of DNS
Recursive Nameserver - server that answers queries about domain names by asking other servers.
Root nameserver - Servers that contain the information that makes up the global list of top level domains. there are 13 Root Nameservers in the world.
TLD nameserver - Specific servers for the specific Top Level Domains i.e. com .in .ai .org etc. there are 1,514 TLD servers in the world.
Authoritative nameserver - Servers which provide domain registration for the domain name.
Workflow of a DNS lookup
There are 8 steps of DNS lookup -
A user types ‘example.com’ into a web browser and the query travels into the Internet and is received by a DNS recursive resolver.
The resolver then queries a DNS root nameserver (.).
The root server then responds to the resolver with the address of a Top Level Domain (TLD) DNS server (such as .com or .net), which stores the information for its domains. When searching for example.com, our request is pointed toward the .com TLD.
The resolver then makes a request to the .com TLD.
The TLD server then responds with the IP address of the domain’s nameserver, example.com.
Lastly, the recursive resolver sends a query to the domain’s nameserver.
The IP address for example.com is then returned to the resolver from the nameserver.
The DNS resolver then responds to the web browser with the IP address of the domain requested initially.
The browser makes a HTTP request to the IP address.
The server at that IP returns the webpage to be rendered in the browser.
What is a DNS record?
DNS records, sometimes referred to as zone files, are directives that are kept in authoritative DNS servers that include details about a domain, such as the IP address linked to it and how queries for that domain should be handled. A collection of text files written in what is referred to as DNS syntax make up these records. Simply said, DNS syntax is a set of characters that are used as commands to instruct the DNS server. Additionally, every DNS record has a "TTL," or time-to-live, that indicates how frequently a DNS server will refresh that record.
You can think of a set of DNS records like a Product listing on Amazon. That listing will give you a bunch of useful information about the product such as its size, availability, price offered, etc. All domains are required to have at least a few essential DNS records for a user to be able to access their website using a domain name, and there are several optional records that serve additional purposes.
In essence, DNS records provide the necessary information for your computer to navigate the internet and find the resources you're looking for.
Most common types of DNS record
A record - The record that contains a domain's IPv4 address.
AAAA record - The record that contains the IPv6 address for a domain (in contrast to A records, which contain the IPv4 address).
CNAME record - This record doesn't provide an IP address; instead, it forwards a domain or subdomain to another domain.
MX record - The Record that directs mail to an email server.
TXT record - The Record that lets an admin store text notes in the record. These records are often used for email security.
NS record - This Record stores the name server for a DNS entry.
SOA record - Stores admin information about a domain.
SRV record - The record that designates a port for a particular service.
PTR record - This Record provides a domain name in reverse-lookups.
DNS Root Server Map
The root server system consists of 1921 instances & the 13 root name servers are operated by 12 independent organizations.
A VeriSign Global Registry Services
B University of Southern California, Information Sciences Institute
C Cogent Communications
D University of Maryland
E NASA Ames Research Center
F Internet Systems Consortium, Inc.
G US DoD Network Information Center
H US Army Research Lab
I Net nod
J VeriSign Global Registry Services
K RIPE NCC
L ICANN
M WIDE Project
The DNS Root Server System Advisory Committee is an ICANN committee. ICANN's bylaws say the committee provides advice to ICANN but the committee claims no authority over the servers or server operators.