Blogs

All you need to know about URL & its components

URL stands for Uniform Resource Locator. It is a specific type of URI (Uniform Resource Identifier). The basic function of an URL is to locate an existing resource on the Internet. URL comes into picture when a web client requests a server for a resource. URL is a unique address, this unique address helps accessing files on the Internet. The basic way of reaching to a website is by entering its URL in the browser. The URL that we entered is of a target website and this targeted website is contacted through a hypertext transfer protocol, which then identifies the website and transports the components or results to the end user.

In other words, URL’s occur mostly to reference a web page and also for file transfer, E-mail, Database access and a myriad of other applications.

What is an Internationalized URL?

Internet is used all around the world consisting of a wide variety users and languages, so naturally it is expected to create URLs in their own local language. So an Internationalized Uniform Identifier (IRI) is a form of URL that allows the usage of Unicode characters. In fact, all advanced and modern browsers support IRI. The domain name and the path requires special treatment for an IRI.

Protocol Relative URLs:

 There are URLs that do not have any protocols specified. These URLs generally use the protocol of the current page that might be either http or https.

The URL for a HTTP or HTTPS is typically made up of the following components:

  1. A Scheme: The function of a scheme is to identify the protocol that is to be used to access the resource on the Internet. It can be either HTTP (without the SSL certificate) or HTTPS (with the SSL certificate).
  2. A Host: The host that holds the resource is identified by a host name. Essentially a server can provide services in the host’s name but the problem is that the host and the server do not have a one-to-one mapping. Ideally port number follows a host name. Port numbers that are well known are usually omitted from the URL. And majority of servers use well-known port numbers and that’s the reason why most of the times the port number is omitted.
  3. A Path: The very specific resource in the host that the web client needs to access is identified by the path.
  4. A Query String: When a Query String is used, it tends to follow the path component and provides a string information that the resource uses for any purpose. A Query string comprises of a name and a value pair. The name and the value pairs are separated from each other with an ampersand (&).