Components of a URL

A URL (Uniform Resource Locator) is a specific type of URI (Universal Resource Identifier). A URL normally locates an existing resource on the Internet. A URL is used when a web client makes a request to a server for a resource.

Uniform Resource Identifiers (URL): Generic syntax rfc2396.

A URL for HTTP (or HTTPS) is normally made up of three or four components:

  1. A scheme. The scheme identifies the protocol to be used to access the resource on the Internet.
  2. A host. The host name identifies the host that holds the resource. For example, www.domain.com. A server provides services in the name of the host, but hosts and servers do not have a one-to-one mapping. Refer to Host names.Host names can also be followed by a port number. Refer to Port numbers. Well-known port numbers for a service are normally omitted from the URL. Most servers use the well-known port numbers for HTTP and HTTPS , so most HTTP URLs omit the port number.
  3. A path. The path identifies the specific resource in the host that the web client wants to access. For example, /section/area/index.html.
  4. A query string. If a query string follows the path component, and provides a string of information that the resource can use for some purpose. The query string is usually a string of name and value pairs separated from each other by an ampersand (&); for example, name1=value1&name2=value2.

The components of the URL are combined and delimited as follows:

scheme://host:port/path?query

Deja una respuesta