The process of resolving a hostname to an IP address is as follows:

  • Depending on system and configuration, when a hostname is entered the system will check local files to see if it has a name to IP address mapping for that host name. If found, this is treated as authoritative even though it may be incorrect, out of date or otherwise.

  • If this fails, and DNS resolution is enabled the system consults the first nameserver it is configured to use and sends a query to that nameserver.

  • If the server being queried has authoritative data for that hostname, it returns it. In other words, if that system holds local files listing information about the domain and is configured to believe that it holds the definitive result, it will return it. Again this does not imply the correct result.

  • If the server being queried does not hold the definitive result and it is configured to forward queries to other nameservers it will consult the list of root nameservers

    .

  • Starting from the rightmost atom, the query will be broken down by finding the definitive system that holds data for that atom. So for example to resolve www.microsoft.com the root nameservers are asked "which system holds authoritative data for ".com"? The query for "which system holds authoritative data for "MICROSOFT.com"? is then forwarded to that system, and so on until system holding the definitive information is reached.

The process of hostname resolution can seem quite stupid. IF for example you configure your system to "search" mycompany.com and you want to visit www.microsoft.com, it will first search for authoritative data for www.microsoft.com.mycompany.com before it looks for www.microsoft.com. This is designed to accomodate lazy people who like to type things like www into their browser window and have the company's webpage pop up immediately.

Tip: To see which nameserver is authoritative for a certain domain from a UNIX system, you can type the command:

dig soa somedomain.com

(Of course assuming that the 'dig' command, internet access, visibility through firewalls are all enabled)

Otherwise you consult the website for your favorite internet registry for the information.