For email updates, send a blank email to blogupdates@wight-hat.com

Beginners guide to Web Hosting

Domain names, IP addresses and DNS

Domain Names: Everyone is familiar with domain names, they are the names of the website or the part after the “@” on an email address. These names are used to find a machine (or sometimes, one of many machines) so that you can find the webpage or deliver the email to the correct place- it is the internet equivalent to a postal address.

Domain names are regulated by a self-funding body called ICANN. If you get a licence from ICANN (which can be quite costly) you can get new domain names directly allocated from them for a few US cents each. Companies that obtain a licence then sell domain registration as a service to everyone else making up the cost of their registration buy marking up the price per domain name- it is a sort of wholsale/ retail model. Specific top level domains are delegated to other bodies such as country specific domains- for example, .uk administration is delegated to NOMINET.

IP addresses: Every machine or node that can be directly accessed on the internet has a unique IP address. This is a just a big number but to make it easier for humans, it is normally written as four numbers separated by dots (eg. 64.15.153.83). As an aside, for those of you that understand binary, each number is an 8 bit binary number 0-255 making a 32 bit number. This can be thought of as the postcode or ZIP code of the postal address in our analogy since many domain names can resolve to the same IP address. Once you have an IP address of a machine on the internet you can connect to that machine.

DNS (Domain Name Server): A DNS server is a server just like any other server on the internet. The purpose of DNS servers are to translate domain names (postal addresses) into IP addresses (postcode/ ZIP codes). Let’s run through an example of what happens when you type www.wight-hat.com into your browser.

  1. First of all, your internet provider will have a DNS cache- this is a list of previously obtained IP addresses for various domain names so that commonly used names do not have to be constantly looked up. In this example, we assume that this is the first time that a domain has ever been requested through the internet provider. The ISP (Internet Service Provider) will start from the right hand side and see that it is a “.com”. It will go to one of the five top level DNS servers in the world (who’s IP addresses are on the record to start with) and ask for the “.com” DNS server. The top level DNS server will provide the IP address for “.com”.
  2. The ISP will then request the “name servers” for wight-hat.com from the machine at the IP address just obtained (from the “.com” DNS server) and this will return two to seven “name servers” which are the machines that hold information on the whereabouts of wight-hat.com. It will receive one of two name servers, “ns1.wight-hat.com 78.40.39.230″ and “ns2.wight-hat.com 64.15.153.83″. These are the IP addresses of DNS servers that contain information on wight-hat.com.
  3. Suppose the first one is received, “ns1.wight-hat.com 78.40.39.230″. The ISP now goes to this IP address and requests “www” for wight-hat.com and receives the IP address 64.15.153.83. The ISP now knows where the machine is for serving the web page www.wight-hat.com.
  4. The page www.wight-hat.com is requested from the machine at 64.15.153.83 and the machine responds with the page.

This may seem a little long winded but there is a reason for this. Remember that the ISP has a record of the previous requests? Lets look at what happens when we now send an email to someone@wight-hat.com.

  1. The ISP knows the DNS server for wight-hat.com because it is in the cache (the record of previous lookups) and finds the DNS IP address is 78.40.39.230.
  2. A request for the MX server (mail server) for wight-hat.com is sent to 78.40.39.230 and the response is that the mail server IP address is 64.15.153.83.
  3. The mail is sent to the machine at 64.15.153.83. This machine then places the email in the “someone” inbox ready for collection.

You can see how, by breaking it into stages and caching the results, fewer requests have to be made over time. The cache will only be kept for each entry for a certain amount of time and is then discarded. After this a new request is made and so if the machine that hosts the www.wight-hat.com site changes, the ISP will be not forever look in the wrong place.

Next section:

Index of all our tutorials: Wight Hat tutorials

For email updates, send a blank email to blogupdates@wight-hat.com