It's more than you probably think
-
A user types the URL http://www.example.com into a browser.
-
The browser sends a request for the IP address of www.example.com to its local resolver (stub-resolver).
-
The stub-resolver queries the locally configured DNS Resolver for the IP address of www.example.com.
-
The DNS Resolver looks up www.example.com in local tables (its cache), but it isn’t found.
-
The DNS Resolver sends a query to a root-server for the IP (the A RR) of www.example.com.
-
The root-server only supports iterative (nonrecursive) queries (see the upcoming section “Iterative (Nonrecursive) Queries”) and answers with a list of name servers that are authoritative for the next level in the domain name hierarchy, which in this case is the gTLD .com (this is called a referral).
-
The DNS Resolver selects one of the authoritative gTLD servers received in the previous referral and sends it a query for the IP of www.example.com.
-
The gTLD name server only supports iterative queries and answers with the authoritative name servers for the Second-Level Domain (SLD) example.com (a referral).
-
The DNS Resolver selects one of the authoritative DNS servers for example.com from the previous referral and sends it a query for the IP (the A RR) of www.example.com.
-
The zone file for example.com defines www.example.com as a CNAME record (an alias) for joe.example.com. The authoritative name server answers with the www.example.com CNAME RR and, in this case, the A RR for joe.example.com, which we will assume is 192.168.254.2.
-
The DNS Resolver sends the response joe.example.com=192.168.254.2 (together with the CNAME RR www=joe) to the original client stub-resolver.
-
The stub-resolver sends www.example.com=192.168.254.2 to the user’s browser.
-
The browser sends a request to 192.168.254.2 for the web page.