One of the main reasons for running a server is to host multiple domain names on a single computer who can publish content for the web. This can accomplished with a technique known as virtual hosting. However, before it can work, the Internet has to know how to find our computer.
DNS (or Domain Name Services) is a process which associates domain names with the IP addresses of the computers where that domain's files may be found. An IP (or Internet Protocol) address is a 32-bit number which is usually expressed as a group of four decimal numbers, each ranging between 0 and 255 and separated by periods, like 184.108.40.206. It takes 8 binary digits (or "bits") to represent the 256 possibile combinations between 0 and 255. The four groups of these numbers covers the 32 bits used for the IP address.
Although a 32-bit number can represent some 4.3 billion combinations (at one time enough for one for each person on Earth), a large number of these IP addresses are part of reserved numbers so the actual number is much smaller. Originally, these IP addresses were divided into class "A", class "B", and class "C" networks though now a protocol known as Classless Inter-Domain Routing ("CIDR") is used to divide the IP addresses into smaller networks.
When a computer user types in a domain name in his favorite web browser, the computer s/he is working on consults the Domain Name Server which is associated with that computer's Internet Service Provider ("ISP"). Through a complex process, the DNS returns the current IP address for that domain name. When the browsing computer has the current IP address, it sends a request to that computer for the files requested by the user. This request includes not only the names of the files requested and the IP address where they should be found but also the domain name entered by the user. This last part only works on browsers which support HTTP (Hypertext Transaction Protocol) 1.1. Earlier versions do not support this feature and may have problems with domain names hosted on servers which use virtual hosting. If an error occurs, such as the file is not found ("404") then the error code is returned to the browser.
A domain name may be reserved through a registrar. Originally, Network Soloutions.com (aka "InterNIC") was the only place where you could register a domain name. Now there are many companies who can perform this service. The resulting competition has led to lower prices for this service. Using the registrar of your choice (or allwhois.com), check to see if the name you want is already taken. If it is not, you can register the name with them by supplying personal information about yourself and the primary and secondary Domain Name Server which will be associated with your name. These DNS servers will act as the authoritative source for your IP address and are usually connected with your Web Hosting Provider as opposed to your ISP.
The people running the DNS will need to have some information so that they can direct the desired traffic to you. If the DNS is run by your Web Hosting Provider, they will know the IP address of the computer which will contain your web space. If the computer is run from your home and you have a static IP address, you can inform them of this for this purpose. It is important to note that servers often have higher traffic than home client computers and your ISP's Terms of Service ("TOS") may prohibit you from running a server. Business accounts, which usually have static IP addresses, are designed to allow you to run a server though the cost is often nearly double that of a home account.
If you have a running system, as we do with linux.ncc.sdccd.net, we can find out the basic networking information:
|Parameter||Value||How to get|
The figures above relate to the ordinary configuration of this server. We have made some changes to make this demonstration work.
The domain name we will consider in this demonstration is WebServerClass.com,
a name I registered a couple months ago. The registrar is BulkRegistry.com
and the DNS is run by Richard Greenwood at NewTechAdvisors.com.
On Richard's computer is a configuration file, called
which contains references to indicate that this DNS server is the primary server
("master") for this domain name. The secondary DNS server ("slave")
is located at CTS.com, the site where NewTechAdvisors.com
is colocated. Below is a portion of this file containing some standard
entries and the entry for this domain name.
No changes were necessary for this demonstration. Since this computer
is identified as the Primary DNS, a change could be made at a file located at
/var/named/webserverclass.com to cause it to point to the new computer.
Below is the original and revised version of this file:
The main changes were the IP address and the serial number for the date. The periods at the end of most of the domain names are important and should not be overlooked.
Once this change was made, we changed the name servers used by the linux.ncc.sdccd.net
server so that they would use the new information immediately. Normally,
it takes up to several days for this information to be copied to other DNS servers
on the Internet. However, as we can see by using the web browser on the
Linux server (
lynx webserverclass.com), we get the same web page
as we would for (
The next step involves making changes to the Linux server so that it will respond properly to this domain name.