URLs (Uniform Resource Locators) are the addresses of all the links and resources which are globally hosted on the World Wide Web. A web page address like http://www.yahoo.com is a URL. It takes you to the home page of yahoo. Whenever you click on a link on a web page, it takes you to another web page. Technically speaking it redirects you to a new URL. Therefore we can say that every hyperlink is associated with a URL. Generally what we type in the address bar is like yahoo.com and then the Yahoo website opens in our web browser. It does not show any errors because the DNS resolves yahoo.com in its full format automatically. Actually yahoo.com is not the complete URL. A complete URL consists of different sections each indicating important information about the web page.
Let us take a comprehensive example of a URL such as
http://www.3seas.com/html/introduction.htm.
This URL has different sub sections which are described below:
- Scheme: It defines the type of protocol which has been used in a particular URL. For eg; the http is the scheme which defines the type of internet service used.
- Host: It defines the domain host. The default host for http is www
- Domain: It defines the domain name which has been registered online. 3seas.com is the domain name.
- Port: It defines the port number on which the http service is running. It is not displayed in the URL.
- The default port number for http is 80. However, this port number can be changed by the IIS administrator.
- Path: It shows the complete path of the directory located at the web server.
- File Name: It tells the name of the document whose contents are being displayed on the screen. In our example, introduction.htm is the file name.
Thus, technically we can split a complete URL as:
scheme://host.domain:port/path/filename
The domain part of the URL can also be split into logical parts. In http;//3seas.com/html/introduction.htm, The 3seas.com is the domain name out of which 3seas defines a unique entity on world wide web (also known as 1st Level domain). The .com represents the top level domain. This is used to describe the type of website. There are predefined standards which indicate the top level domains and their corresponding meanings. Some of the popular ones are:
COM It shows that the web page is intended for commercial business
2) .ORG It represents a non commercial community website
3) .NET This is used by ISPs (Internet Service Providers)
4) .MIL It is used by Military of United states only.
5) .GOV Used only by government agencies
Apart from the top level domain and 1st level domain, a domain name can also have various sub domains arranged in a hierarchy. All of them are separated by a period ‘.’ The left most represents the lowest level in domain hierarchy and the rightmost represents the top level domain. A typical example of domain name hierarchy is:
www.india.asia.nokia.com
Where india represents the lowest level in the domain hierarchy and .com represents the top level domain.
In HTML coding the URLs to a link are defined with the help of <a> tag. For eg:
<a href=””http://www.yahoo.com””>Click Here</a></p>
According to the above example you will be redirected to yahoo.com if you click on Click Here text on the web page. Although you will not find any difference whether you type the URL in upper case or lower case because the DNS server resolves that automatically, but it should be noted that the URLs are always case sensitive.