What is an URL?

URL stands for Uniform Resource Locator (URL). It is the web address of an online resource like a website, webpage or a document on the internet. It tells the location and name of the resource as well as the protocol used to access it, i.e., it locates an existing resource on the internet. A URL may contain as many as six parts, and cannot have less than two parts. For example, http://www.example.com, in this URL we have two parts: a protocol (http) and a domain (www.example.com).

A URL for HTTP or HTTPS generally comprises three or four components, such as:

  • Protocol: It is used to access the resource on the internet. It can be HTTP, without SSL or HTTPS with SSL. It is connected to the domain name, and the domain name is further connected to the file path.
  • Domain name: It is a unique name that identifies a website on the internet. For example, “javatpoint.com”. It always includes a top-level domain (TLD) which is “.com” in this example.
  • Port: It is a port number, which is usually not visible in a URL, but it is always required. When visible, it comes after the TLD, separated by a colon.
Share: