Let's say you're trying to resolve
www.example.com.
If the name server(s) (or DNS server(s), same thing) you're using (which is generally your ISP's, but it doesn't have to be; you could run your own or use someone else's) doesn't have the address (A) record for
www.example.com cached, it will have to search for the answer. How does it search for the answer? Let's start from scratch.
There are 13 root servers:
Code:
A.ROOT-SERVERS.NET. has address 198.41.0.4
B.ROOT-SERVERS.NET. has address 128.9.0.107
C.ROOT-SERVERS.NET. has address 192.33.4.12
D.ROOT-SERVERS.NET. has address 128.8.10.90
E.ROOT-SERVERS.NET. has address 192.203.230.10
F.ROOT-SERVERS.NET. has address 192.5.5.241
G.ROOT-SERVERS.NET. has address 192.112.36.4
H.ROOT-SERVERS.NET. has address 128.63.2.53
I.ROOT-SERVERS.NET. has address 192.36.148.17
J.ROOT-SERVERS.NET. has address 192.58.128.30
K.ROOT-SERVERS.NET. has address 193.0.14.129
L.ROOT-SERVERS.NET. has address 198.32.64.12
M.ROOT-SERVERS.NET. has address 202.12.27.33
The name server you're using asks the root servers for the address (A) record(s) for
www.example.com.
The root servers will answer:
Code:
com. 172800 IN NS A.GTLD-SERVERS.NET.
com. 172800 IN NS B.GTLD-SERVERS.NET.
com. 172800 IN NS C.GTLD-SERVERS.NET.
com. 172800 IN NS D.GTLD-SERVERS.NET.
com. 172800 IN NS E.GTLD-SERVERS.NET.
com. 172800 IN NS F.GTLD-SERVERS.NET.
com. 172800 IN NS G.GTLD-SERVERS.NET.
com. 172800 IN NS H.GTLD-SERVERS.NET.
com. 172800 IN NS I.GTLD-SERVERS.NET.
com. 172800 IN NS J.GTLD-SERVERS.NET.
com. 172800 IN NS K.GTLD-SERVERS.NET.
com. 172800 IN NS L.GTLD-SERVERS.NET.
com. 172800 IN NS M.GTLD-SERVERS.NET.
A.GTLD-SERVERS.NET. 172800 IN A 192.5.6.30
B.GTLD-SERVERS.NET. 172800 IN A 192.33.14.30
C.GTLD-SERVERS.NET. 172800 IN A 192.26.92.30
D.GTLD-SERVERS.NET. 172800 IN A 192.31.80.30
E.GTLD-SERVERS.NET. 172800 IN A 192.12.94.30
F.GTLD-SERVERS.NET. 172800 IN A 192.35.51.30
G.GTLD-SERVERS.NET. 172800 IN A 192.42.93.30
H.GTLD-SERVERS.NET. 172800 IN A 192.54.112.30
I.GTLD-SERVERS.NET. 172800 IN A 192.43.172.30
J.GTLD-SERVERS.NET. 172800 IN A 192.48.79.30
K.GTLD-SERVERS.NET. 172800 IN A 192.52.178.30
L.GTLD-SERVERS.NET. 172800 IN A 192.41.162.30
M.GTLD-SERVERS.NET. 172800 IN A 192.55.83.30
Explanation: Those are the name server (NS) records for
com and the associated address (A) records. The
172800 tells the name server you're using to cache the record for 172,800 seconds (two days). That is called the TTL (time to live).
Simple explanation: The root servers basically said, "I don't know. Here are the name servers of
com and their IP addresses. Ask them. You don't have to ask me for the name servers of
com for another two days."
The name server you're using now asks the name servers of
com for the address (A) record(s) for
www.example.com.
The name servers of
com will answer:
Code:
EXAMPLE.COM. 172800 IN NS a.iana-servers.net.
EXAMPLE.COM. 172800 IN NS b.iana-servers.net.
a.iana-servers.net. 172800 IN A 192.0.34.43
b.iana-servers.net. 172800 IN A 193.0.0.236
Explanation: Those are the name server (NS) records for
example.com and the associated address (A) records (which are called glue records). If the name servers of
com did not return glue records, the name server you're using would then have to search for the associated address (A) records.
Simple explanation: The name servers of
com basically said, "I don't know. Here are the name servers of
example.com and their IP addresses. Ask them. You don't have to ask me for the name servers of
example.com for another two days."
The name server you're using now asks the name servers of
example.com for the address (A) record(s) for
www.example.com.
The name servers of
example.com will answer:
Code:
WWW.EXAMPLE.COM. 172800 IN A 192.0.34.166
Explanation: That is the address (A) record of
www.example.com. The name server you're using now has the address (A) record of
www.example.com cached for two days, unless the cache is flushed or the server is restarted and the cache is not saved.
Simple explanation: The name servers of
example.com basically said, "I know! It's 192.0.34.166! You don't have to ask me for the address of
www.example.com for another two days." The name server you're using now "remembers" the address of
www.example.com for two days. If it "forgets," it can just go through the same process again.
If you register a
com domain, the name servers of
com are the ones that have to update. Since the name servers of
com only update twice a day, you will have to wait until your domain is included before it starts working. Your ISP does not update anything. Nothing "spreads throughout the Internet." Information is gathered as needed.