URL is an abbreviation for Uniform Resource Locator. It was previously known as the Universal Resource Locator and is a type of Uniform Resource Identifier. The URL is a unique address or file path that represents the location of a file on the internet and also specifies the method to retrieve the resource from the location.
Every website on the internet has a unique URL, which can be entered into the address bar of a web browser to access and view it. Any other file or resource such as an image file, web (HTML) page other than the home page, Java applet and even programs imbedded inside a site, such as a Common Gateway Interface (CGI) application, can also be accessed using a URL.
The URL consists of a protocol that tells the web browser how to retrieve the file or resource; a domain name which identifies the specific web server on the Internet where the file is stored; and a pathname, which is a hierarchical description that specifies the location of the particular file on the computer.
A typical URL is set up in the following way:
The first part of the URL, in this case http, is the specified scheme. The HTTP (Hyptertest Transfer Protocol) scheme is used to transfer HTML pages on the web. Other protocols are ftp, gopher, mailto, and wais, which are all used for their own purpose. The scheme is separated from the rest of the URL by a colon; the rest of URL follows the colon in a format specific to the scheme.
The second part of the URL, in this case www.abcd.com, specifies a unique web server name. This name is a hierarchy of domains, descending from right to left and separated by a dot. The rightmost domain, or label, is the TLD.
Berners-Lee originally designed the URL to have the domain name separated by dots, but later regretted it, wishing he had designed the URL to be separated by slashed throughout, as in:
http:com/sample/www/path/to/name instead of
http://www.sample.com/path/to/name.  Twenty years after creating the URL, Tim Berners-Lee, in an interview with Times, went so far as to apologize for using the two forward slashes (//) following the colon separator.
Types of URL
There are two types of URLs, Absolute and Relative.
The Absolute URL is a URL that is independent of other elements and points directly to an exact file location. For instance, "
mywebsite.com/images/homepage.jpg" is an Absolute URL, which specifies that the image file homepage.jpg is located in the images directory, under the mywebsite domain.
A Relative URL is a type of URL that is dependent on other elements and point to a directory or file in relation to the present directory or file. For example, "
../image/homepage.jpg." In this, the first two periods (..) direct the server to move up one directory (the root directory), then enter the images directory and point to the homepage.jpg file. The main benefit of a Relative URL is that it allows a webmaster to make changes to the directory without the worry of breaking a file path.
In a new search engine trend, URLs, when shortened, can play a major role in the Search Engine Optimization (SEO) of a web site. Many SEO experts advise that a URL of the form:
www.yourwebsite.com/category/subcategory leads to better search engine rankings. Google, a leading search engine, has developed a URL shortener to convert longer URLs into short ones. The idea behind this is that, with shorter URLs, the sharing of links between people is made easier, which in turn can increase traffic to a web site.