Parts of a URL

A typical URL may look something like this:

http://www.google.com/search?q=url&sourceid=navclient-ff&ie=UTF-8&rlz=1B...

The first part of the URL, ‘http’ is the protocol and defines the type of server required to fetch the resource indicated by the URL. Other types of protocols may include ‘file’ to retrieve files on the local hard drive, ‘ftp’ to retrieve files from ftp servers rather than Webservers and ‘mailto’ used to invite a user to write email to an email address.

The second part of the URL comprises the domain name. The part ‘www.google.com’ gives the hostname and is called ‘fully qualified domain name’. This part of the URL should be a valid Internet hostname and can also be IP addresses such as 202.88.000.000. Domain name is the last part of the fully qualified domain name, google.com in this case. This part of the URL is also sometimes followed by a port number. Port number is used to identify the right service for a data if the server sending it provides more than one service. The default port for http server is 80, though some other port numbers like 8000 are possible. If the port is the default one, people generally leave out the port number.

The ‘/search’ gives the path of the location where a resource is available on the server.

If the URL has parameters then those parameters are indicated after the question mark. The parameters are separated by ampersand ‘&’.

Some URLs may also have a part after a hash ‘#’. This is usually to denote an internal segment within the Webdocument. Webmasters, as website owners are commonly called, sometimes want to direct users to say 2nd paragraph of their Webpage. They do this using some identifier after the ‘#’ like ‘#second’.

Static and Dynamic URL:

While most URLs can directly specify the locations of the resources on the server, some may require the web-server to do some calculations in order to retrieve the resource. This is usually the case when the resource on the page itself is generated dynamically and differently for different query. Such URLs are called dynamic URLs. A good example of a dynamic URL is the URL mentioned above generated for dynamically for a search query on Google for URL.