URL - Uniform Resource Locator

URLs identify object locations on a network

A Uniform Resource Locator identifies a specific resource, service or object on a network. URL strings consist of three parts:

  1. Protocol designation
  2. Host name or address
  3. Resource location

These substrings are separated by special characters as follows:

protocol :// host / location
HTTPS
KTSDESIGN/SCIENCE PHOTO LIBRARY / Getty Images

URL Protocol Substrings

The protocol substring defines a network protocol for accessing a resource. These strings are short names followed by the three characters ://. Typical URL protocols include HTTP (http://), FTP (ftp://), and email (mailto://).

URL Host Substrings

The host substring identifies a destination computer or other network device. Hosts source from standard Internet databases such as DNS and can be names or IP addresses. The host names of many websites refer to not just a single computer but rather groups of servers.

URL Location Substrings

The location substring contains a path to one specific network resource on the host. Resources are normally located in a host directory or folder. For example, a website may have a resource like /2016/September/word-of-the-day-04.htm to organize content by dates.

When the location element is an empty, shortcut as in the URL http://example.com, the URL conventionally points to the root directory of the host (denoted by a single forward slash - '/') and often a home page (like 'index.htm').

Absolute and Relative URLs

Full URLs featuring all three of the abovementioned substrings are called absolute URLs. In some cases, URLs may specify only the one location element. These are called relative URLs. Relative URLs are used by web servers to avoid hard-coding location elements that may be subject to change.

Following the above example, web pages on the same server that link to it can code a relative URL as

  • <a href="/2016/September/word-of-the-day-04.htm">

instead of the equivalent absolute URL

  • <a href="http://example.com/2016/September/word-of-the-day-04.htm">

taking advantage of the server's assumption of the missing protocol and host information. Relative URLs only work when the host and protocol information is established.

URL Shortening

Standard URLs on modern sites tend to be long strings of text. Because sharing longer-length URLs on Twitter and other social media is cumbersome, several companies built online translators that convert a full (absolute) URL into a much shorter one specifically for use on their social networks. Popular URL shorteners of this kind include t.co (used with Twitter) and lnkd.in (used with LinkedIn).

Other URL shortening services like bit.ly and goo.gl work across the internet and not just with specific social-media sites.

In addition to offering an easier way to share links with others, some URL shortening services also offer click statistics. A few also safeguard against malicious uses by checking the URL location against lists of suspicious domains.