When you enter a domain name into your
browser, your computer first checks its
local cache
for the corresponding IP address.
If the IP address is not found locally, a
DNS request is sent to a local
DNS server, often managed by your company
or internet service provider, ISP
The local DNS server checks its cache for
the IP address.
If the IP address is cached, The server
sends the cached IP address back
to your computer, allowing your browser to
connect to the website.
If the IP address is not cached.
The local DNS server forwards the request
to a recursive DNS resolver, which
begins querying other DNS servers.
It starts with the root name server, which
directs the query to the appropriate
top-level domain
TLD name server, for example, .com or
.org.
The TLD name server forwards the query to
the authoritative name server for the
domain
which provides the IP address for the
requested domain name.
The recursive DNS resolver returns the IP
address to the local DNS server, which
caches it and sends it back to your
computer.
Your browser uses the IP address to
connect to the website.