The whole internet is based on the concept of URL. Before we move ahead to understand what is an URL and what are its different components, it would be helpful to know a bit about HTTP protocol and HTML language.
HyperText Transfer Protocol (HTTP)
HTTP defines the method by which hypertext documents (web pages) are located (after clicking on a hyperlink) and retrieved over the Web.
Hypertext Markup Language (HTML)
HTML is a simple text based programming language that is used to create web pages. It consists of a set of text based tags, inter-meshed with the web page text to provide information to format the page in the browser and locate associated multimedia files.
<html> <head> <title> CP1030 Home Page </title> </head> <body> <center> <h2> CP1030 Semester 1, 2001 </h2> <p> CP1030 <i> Introduction to Information Technology </i> is an introductory subject designed to give all students an insight into the use and impact of information technology at home, work and in their studies. </center> </body> </html>
Uniform Resource Locater (URL)
A URL defines the web address of the target HTML document.
The format of a URL is:
<protocol>://<domain name><:port>/<directory path>/<file name> http://www.jcu.edu.au/subjects/information/index.html
Defines the protocol (rules and format) to be used for the type of service such as fetching a web page (HyperText Transfer Protocol -http) or a performing a file transfer (File Transfer Protocol – ftp).
The domain name www.jcu.edu.au is the fully qualified domain name that uniquely identifies the JCU web server.
- www is the name of the host computer which is operating as a web server within the jcu.edu.au domain
- jcu indicates this is the JCU domain
- edu (education) is the second level domain within which the JCU domain resides
- au (Australian) is the country domain and top level domain
Note that URL formats may differ from that of the example above.
In some instances a URL does not have a country domain (referred to as a country code Top Level Domain or ccTLD). In this case the the top level domain is the extension .com .net .org etc (referred to as the Generic Top Level Domain or gTLD).
|Generic Top Level Domains
|Country Code Top Level Domains
|.pro||Accountants, lawyers and physicians|
|.int||International bodies set up in response to UN treaties|
Within a ccTLD the second level domain is set by the domain name authority for that country. Within Australia the current set of possible second level domains are:
.com.au .net.au .edu.au .gov.au .org.au
.asn.au .id.au .info.au .oz.au
.conf.au .csiro.au .telememo.au
Port Number (optional)
- The port number is only required if the web server is not set up on the default port (:80)
- :8080 is a common port number used when the default port number is not available for use
- /subjects/information/ identifies the directory path to the file
Document File Name
- index.html identifies the filename of the target document
Displaying a Web Page
When a URL is typed into the browser, or a link is clicked, a requested is sent out from the browser to the server defined by the URL.
JCU Home Page: http://cairns.cs.jcu.edu.au/index.html
The domain name is first converted to the numerical IP address for the JCU web server. Every web server on the Internet has a unique IP address which is registered with a world wide governing body. Without this address the Internet traffic could not be routed through the Internet from the source to the destination.
A request is then sent to the server to retrieve the HTML document.
The JCU web server manages the Internet request by locating and returning the specified document or file. In this case the file index.html is returned and displayed in the browser window.