Such identification enables interaction with representations of the resource over a network, typically the World Wide Web, using specific protocols.
Schemes specifying a concrete syntax and associated protocols define each URI. The most common form of URI is the Uniform Resource Locator (URL), frequently referred to informally as a web address. More rarely seen in usage is the Uniform Resource Name or (URN), which was designed to complement URLs by providing a mechanism for the identification of resources in particular namespaces.
The specifications that govern the schemes determine the syntax and semantics of the scheme-specific part.
However, URI syntax does require all schemes to adhere to a general syntax that (among other things) reserves certain characters for special purposes (without always identifying those purposes).
The URI syntax also enforces restrictions on the scheme-specific part in order to (for example) provide for a degree of consistency when the part has a hierarchical structure.
Internet standard STD 66 (also RFC 3986, RFC 6874 and RFC 7320) defines the generic syntax to be used in all URI Schemes.
Every Uniform Resource Identifier is defined as consisting of several parts, as follows:
hierarchical part ┌───────────────────┴─────────────────────┐ authority path ┌───────────────┴───────────────┐┌───┴────┐ abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1 └┬┘ └───────┬───────┘ └────┬────┘ └┬┘ └─────────┬─────────┘ └──┬──┘ scheme user information host port query fragment urn:example:mammal:monotreme:echidna └┬┘ └──────────────┬───────────────┘ scheme path
A typical Uniform Resource Identifier might look like:
URI = <scheme name> : <hierarchical part> [ ? <query> ] [ # <fragment> ]
For the particular case of the HTTP (and HTTPS) scheme, defined on RFC 7230, the syntax becomes:
http-URI = "http:" "//" authority path-abempty [ "?" query ] [ "#" fragment ]
Several existing specifications can aid in this.
Specifying more elaborate structures in an attempt to avoid collisions is not an acceptable solution, and does not address the issues in RFC 7320 Section 1. For example, prefixing query parameters with "myapp_" does not help, because the prefix itself is subject to the risk of collision (since it is not "reserved").
On the other hand, the URI "mailto:joe@example.com" indicates that the URI refers to a mailbox. The "mailto" URI Scheme specification authorizes agents to infer that URIs of this form identify Internet mailboxes.