The Domain Name System, or DNS, is a core function of the Internet. DNS is used to resolve human-readable hostnames into IP addresses, such as resolving 'www.dyndns.com' to '63.208.196.66', and also stores other information about domains, such as the location of mailservers. DNS is used whenever you resolve a hostname, whether you are visiting a website, accessing an FTP server, sending email, or any other Internet service.
Think of DNS as a kind of phone book for the Internet. If you have a person's name, but do not know their telephone number, you can look it up in a phone book. DNS provides this same type of service to the Internet. When you visit 'http://www.dyndns.com' in a web browser, DNS retrieves the site's IP address, '63.208.196.66', which the browser then uses to connect to the webserver.
Without phone books, you would not be able to learn someone's telephone number unless they previously gave it to you. Likewise, without DNS, you would only be able to reach sites via their IP addresses; instead of 'www.dyndns.com' or 'www.google.com', you would have to type 'http://63.208.196.66' or 'http://72.14.207.99' every time you wanted to view the sites.
How does DNS work when you type www.dyndns.com into a web browser?
You begin by asking your computer to resolve a hostname, such as visiting 'http://www.dyndns.com' in a web browser. The first place your computer looks is its local DNS cache, which stores DNS information that the computer has recently retrieved. (You can learn more about DNS caching here.)
If the records are not stored locally, your computer queries (or contacts) your ISP's recursive DNS servers. These machines perform the legwork of DNS queries on behalf of their customers. The recursive DNS servers have their own caches, which they check before continuing with the query.
If the recursive DNS servers do not have the record cached, they contact the root nameservers. These thirteen nameservers contain pointers for all of the Top-Level Domains (TLDs), such as '.com', '.net' and '.org'. If you are looking for 'www.dyndns.com.', the root nameservers look at the TLD for the domain - 'www.dyndns.com'- and direct the query to the TLD DNS nameservers responsible for all '.com' pointers.
The TLD DNS servers do not store the DNS records for individual domains; instead, they keep track of the authoritative nameservers for all the domains within their TLD. The TLD DNS servers look at the next part of the query from right to left - 'www.dyndns.com' - then direct the query to the authoritative nameservers for 'dyndns.com'.
Authoritative nameservers contain all of the DNS records for a given domain, such as host records (which store IP addresses), MX records (which identify nameservers for a domain), and so on. Since you are looking for the IP address of 'www.dyndns.com', the recursive server queries the authoritative nameservers and asks for the host record for 'www.dyndns.com'.
The recursive DNS server receives the host record for 'www.dyndns.com' from the authoritative nameservers, and stores the record in its local cache. If anyone else requests the host record for 'www.dyndns.com', the recursive servers will already have the answer, and will not need to go through the lookup process again until the record expires from cache.
Finally, the recursive server gives the host record back to your computer. Your computer stores the record in its cache, reads the IP address from the record, then passes this information to the web browser. Your browser then opens a connection to the IP address '63.208.196.66' on port 80 (for HTTP), and our webserver passes the web page to your browser, which displays our site.