PLEASE note: These pages are here solely for historic purposes. New articles have not been written since 2001; many links in the index are broken; and most ahref.com email addresses will now bounce. Try visiting ep Productions, Incorporated, the web programming and development company behind this site.

Tip: Having problems with this site? Please report them to the webmaster.

web index ahref.com: a community space for web developers------ -----
IndexToolsCareersTalk
ahref.com > Guides > Technology
Technology Guide


Domain Names Part 2: How DNS Works

11/24/1999
by Edward Piou

DNS - the Domain Name System - is the addressing system of the Internet. Using DNS, your computer figures out what IP address (for example, 216.112.23.11) corresponds with a particular computer hostname (for example, "www.ahref.com"). Your computer (through the magic of networking) knows how to get to any IP address on the Internet, and uses that IP address to figure out where it should send messages.

We non-computers could use the IP address instead of the domain name in some cases - for example, the URL http://216.112.23.11/ will take you to the ahref.com front page, and email sent to piou@[216.112.23.11] will get to piou@ahref.com. (The brackets in the email address are necessary when using IP addresses.) Mapping between domain names and IP addresses using DNS makes things much simpler for us, though. They also help with portability: you don't need to retain control over a particular part of a network to maintain your email address or web services; people can follow you around using your domain name.

A previous ahref.com article talked about the history of the Domain Name System, and how it was changing through ICANN and other organizations. This article will talk about how DNS actually works - how your computer figures out what address to go to for a particular machine.

Figuring Out Which Server Knows What

When you try to connect to a web page - for example, http://www.ahref.com/guides/industry/199903/0323piou.html - your web browser splits the URL into its component parts, and determines which part - in this case, www.ahref.com - is the hostname. (We'll refer to the host you're trying to reach as the target machine, or target.) If you've visited a page on the target machine recently, your computer will remember the IP address of the host, and send a request for the page to that IP address.

If your computer doesn't have the target's IP address, it will connect to whatever local nameserver you have configured it to use. (Actually, it will most likely connect to one of several local nameservers you've configured.) The local nameserver most likely serves multiple machines in your (network) area. If any of the machines which this server serves have asked for the target machine recently (within the target's TTL, which we'll talk about later), the local nameserver will have that machine's IP address stored, and will immediately return that IP address to your computer. If the server does not have the IP address stored, it will try to figure out what remote nameserver has information on the target computer, and retrieve information from there.

The first place your local nameserver will ask for information will be one of the "root" nameservers - one of 13 computers which stand at the center of the Domain Name System. Every nameserver on the Internet (aside from those whose administrators have decided to alter their configuration for some reason) has the IP addresses of these root servers permanently stored. The root nameservers contain information on which nameservers are responsible for which Internet top-level domains (.com, .org, .gov, .au, .us, etc. - the last set of characters in any host or domain name). If you're looking for www.ahref.com, the root server your local nameserver contacts will point you to several nameservers that contain authoritative information for the .com top-level domain.

Once it has the .com server's IP address, your nameserver will ask it for the IP address of the nameserver which has authority over the ahref.com domain. The IP address which is returned at this point will be one of the addresses which the domain owner entered when registering the domain with Network Solutions or one of the other registrars.

Now that your local nameserver knows where to find the nameserver for the target machine, it asks that nameserver for the IP address of the target. The target's nameserver returns that information, as well as a "time to live" - the amount of time that your local nameserver should store the IP address it has received. (This time is generally set fairly low - a matter of days or hours - in case the target machine's IP address needs to be changed quickly.)

Once your local nameserver has this information, it returns the information to your computer, and you are able to connect to the target machine.

continue reading >>>
or jump to a topic:

Local, Root, and Remote Nameservers
MX vs. A. What's Next.

view a printable version of this article


To suggest a topic, please email info@ahref.com.

 


HOME ||| ABOUT AHREF.COM ||| ADVERTISE ||| FEEDBACK ||| SEARCH THIS SITE ||| CONTRIBUTE

This site © 1998-1999 ep Productions, Inc. Text of any articles is copyright of the author. All rights reserved. Terms of use.