Uniform Resource Locator
The relationship of URL to URI and URN
In computing, a Uniform Resource Locator (URL) is a Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it. In popular usage and in many technical documents and verbal discussions it is often incorrectly used as a synonym for URI.[1] The best-known example of a URL is the "address" of a web page on the World Wide Web, e.g. http://www.example.com.
History
The Uniform Resource Locator was created in 1994[2] by Tim Berners-Lee, Marc Andreessen, Mark P. McCahill, Alan Emtage, Peter J. Deutsch and Jon Postel, as part of the URI.[3] Berners-Lee regrets the use of dots to separate the route to the server in the URI, and wishes he had used slashes throughout.[4] For example, http://www.serverroute.com/path/to/file.html would look like http:com/serverroute/www/path/to/file.html. Berners-Lee has also admitted that the two forward slashes before the server route were unnecessary.[5]
Syntax
Every URL consists of some of the following: the scheme name (commonly called protocol), followed by a colon, then, depending on scheme, a hostname (alternatively, IP address), a port number, the path of the resource to be fetched or the program to be run, then, for programs such as Common Gateway Interface (CGI) scripts, a query string,[6][7] and with HTML documents, an anchor (optional) for where the page should start to be displayed.[8]
The combined syntax is
scheme://username:password@domain:port/path?query_string#anchor
- The scheme name, or resource type, defines its namespace, purpose, and the syntax of the remaining part of the URL. Most Web-enabled programs will try to dereference a URL according to the semantics of its scheme and a context. For example, a Web browser will usually dereference the URL http://example.org:80 by performing an HTTP request to the host example.org, at the port number 80. Dereferencing the URL mailto:bob@example.com will usually start an e-mail composer with the address bob@example.com in the To field.
- Other examples of scheme names include https:, gopher:, wais:, ftp:. URLs that specify https as a scheme (such as https://example.com/) denote a secure website.
- The registered domain name or IP address gives the destination location for the URL. The domain google.com, or its IP address 72.14.207.99, is the address of Google's website.
- The hostname and domain name portion of a URL are case-insensitive since the DNS is specified to ignore case. http://en.wikipedia.org/ and HTTP://EN.WIKIPEDIA.ORG/ both open the same page.
- The port number is optional; if omitted, the default for the scheme is used. For example, if http://myvncserver.example.com:5800 is typed into the address bar of a browser it will connect to port 5800 of myvncserver.example.com; this port is used by the VNC remote control program and would set up a remote control session. If the port number is omitted a browser will connect to port 80, the default HTTP port.
- The path is used to find the resource specified. It is case-sensitive, though it may be treated as case-insensitive by some servers, especially those based on Microsoft Windows. If the server is case sensitive and http://en.wikipedia.org/wiki/URL is correct, http://en.wikipedia.org/WIKI/URL/ or http://en.wikipedia.org/wiki/url/ will display an HTTP 404 error page, unless these URLs point to a valid resource themselves.
- The query string contains data to be passed to web applications such as CGI programs. The query string contains name/value pairs separated by ampersands, with names and values in each pair being separated by equal signs, for example first_name=John&last_name=Doe.
- The anchor part when used with HTTP specifies a location on the page. For example http://en.wikipedia.org/wiki/URL#Syntax addresses the beginning of the Syntax section of the page.
- On some sites, the anchor may have other functions; see: fragment identifier.
Absolute vs relative URLs
By definition, a URL describes a location and means for obtaining a resource. The term "relative URL" is a contradiction of this definition but is often used to mean "relative URI".
URLs as locators
A URL is a URI that, "in addition to identifying a resource, provides a means of locating the resource by describing its primary access mechanism (e.g., its network location)".[9][10]
Internet hostnames
On the Internet, a hostname is a domain name assigned to a host computer. This is usually a combination of the host's local name with its parent domain's name. For example, en.wikipedia.org consists of a local hostname (en) and the domain name wikipedia.org. The hostname is translated into an IP address via the local hosts file, or the Domain Name System (DNS) resolver. It is possible for a single host computer to have several hostnames; but generally the operating system of the host prefers to have one hostname that the host uses for itself.
Any domain name can also be a hostname, as long as the restrictions mentioned below are followed. For example, both "en.wikimedia.org" and "wikimedia.org" are hostnames because they both have IP addresses assigned to them. The domain name "pmtpa.wikimedia.org" is not a hostname since it does not have an IP address, but "rr.pmtpa.wikimedia.org" is a hostname. All hostnames are domain names, but not all domain names are hostnames.
See also
- CURIE (Compact URI)
- Extensible Resource Identifier (XRI)
- Internationalized Resource Identifier (IRI)
- Uniform Resource Identifier (URI)
- URL normalization
- URI scheme
References
External links
Hypermedia |
|
Basics |
Hypertext · Hyperlink · Hypervideo · Adaptive hypermedia (educational, authoring) · Hyperlinks in virtual worlds
|
|
Technology |
|
|
See also |
|
|