Uniform Resource Locator and Uniform Resource Identifier.

Uniform Resource Locator (URL)

A Uniform Resource Locator (URL), colloquially termed a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identifier (URI), although many people use the two terms interchangeably. URLs occur most commonly to reference web pages (http), but are also used for file transfer (ftp), email (mailto), database access (JDBC), and many other applications.

Every HTTP URL conforms to the syntax of a generic URI.

Uniform Resource Identifier (URI)

A Uniform Resource Identifier (URI) is a string of characters that unambiguously identifies a particular resource. To guarantee uniformity, all URIs follow a predefined set of syntax rules, but also maintain extensibility through a separately defined hierarchical naming scheme (e.g. http://).


Each URI begins with a scheme name that refers to a specification for assigning identifiers within that scheme. As such, the URI syntax is a federated and extensible naming system wherein each scheme’s specification may further restrict the syntax and semantics of identifiers using that scheme. The URI generic syntax is a superset of the syntax of all URI schemes. It was first defined in RFC 2396, published in August 1998, and finalized in RFC 3986, published in January 2005.

The URI generic syntax consists of a hierarchical sequence of five components:

URI = scheme:[//authority]path[?query][#fragment]

authority = [userinfo@]host[:port]


        userinfo       host      port
        ┌──┴───┐ ┌──────┴──────┐ ┌┴┐
└─┬─┘   └───────────┬──────────────┘└───────┬───────┘ └───────────┬─────────────┘ └┬┘
scheme          authority                  path                 query           fragment

└┬─┘   └─────┬─────┘└─┬─┘ └──────┬──────┘
scheme   authority   path      query

└─┬──┘ └────┬─────────────┘
scheme     path

└┬─┘ └─────────────┬─────────────────┘
scheme            path

└┬┘ └──────┬──────┘
scheme    path

└─┬──┘   └─────┬─────┘│
scheme     authority  path

└┬┘ └──────────────────────┬──────────────────────┘
scheme                    path