docs.rodeo

MDN Web Docs mirror

URI authority

The authority of a URI is the section that comes after the scheme and before the path. It may have up to three parts: user information, host, and port.

Syntax

host
host:port
user@host
user@host:port

Description

Consider the following URL:

http://www.example.com:80/path/to/myfile.html?key1=value1&key2=value2#SomewhereInTheDocument

The authority in this case is www.example.com:80, comprised of the host name (specifically a domain name) and a port.

Domain Name

www.example.com is the host name of the URI, indicating which Web server is being requested. Here, we use a domain name, but it’s also possible to use an {{Glossary("IP address")}}  of the host. Because IP addresses are less convenient and harder to remember, it’s more common to use a domain name unless the server doesn’t have one registered.

Port

:80 is the port of the URL, indicating the technical “gate” used to access the resources on the web server. It is usually omitted if the web server uses the standard ports of the HTTP protocol (80 for HTTP and 443 for HTTPS) to grant access to its resources. Otherwise, it is mandatory.

Examples

Specifications

{{Specifications}} 

See also

In this article

View on MDN