HostingGreen web hosting packages
TutorialsBeginners guides to SEO & hosting
Beginners guide to Web Hosting
Domain names, IP addresses and DNS
Domain Names: Everyone is familiar with, 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 newnames 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 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. 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. 184.108.40.206). 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.
(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. -hat.com into your browser.
- 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”.
- The ISP will then request the “name servers” for 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 220.127.116.11″ and “ns2.wight-hat.com 18.104.22.168″. These are the IP addresses of DNS servers that contain information on wight-hat.com.
- Suppose the first one is received, “ns1.wight-hat.com 22.214.171.124″. The ISP now goes to this IP address and requests “www” for wight-hat.com and receives the IP address 126.96.36.199. The ISP now knows where the machine is for serving the web page .
- The page www.wight-hat.com is requested from the machine at 188.8.131.52 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 firstname.lastname@example.org.
- 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 184.108.40.206.
- A request for the MX server (mail server) for wight-hat.com is sent to 220.127.116.11 and the response is that the mail server IP address is 18.104.22.168.
- The mail is sent to the machine at 22.214.171.124. 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: Round robin DNS configuration
Index of all our tutorials: Wight Hat tutorials