DNS (DOMAIN NAME SYSTEM)
WHAT IS DNS ?
A DNS (DOMAIN NAME SYSTEM) helps us to translate domain name (ex-example.com) into IP ADDRESS (machine readable). It allows user to access websites without remembering numeric IP ADDRESSES.
HOW DNS WORKS ?
The process of translation of domain name (ex- example.com) into IP ADDRESS (machine readable), starts from a query by our system (STUB RESOLVER) to the RECURSIVE RESOLVER/PUBLIC DNS RESOLVER (ex - Google DNS – 8.8.8.8 Cloudflare DNS – 1.1.1.1).
The Stub Resolver checks in its local cache about the domain name if found all the other steps are terminated.
Recursive Resolver also checks it own cache first before going to the Root Server, if the IP address of example.com is not found in the cache of “recursive resolver” it forwards the query to the ROOT Servers.
ROOTS Servers guide queries to the correct TLD Servers.
TLD Servers store information about the authoritative servers responsible for the domain name (example.com) and tells the RECURSIVE Resolver about it.
The recursive resolver for the last time sends the query to TLD Servers and gets referred to the authoritative servers responsible for the domain name (example.com). And, the authoritative servers tells the user about the IP address of the domain name and then also gets cached in both stub and recursive resolver for a particular time for faster access next time.