What do you call the entire first part of a URL?
I don't know the name for when it has the scheme, but the hostname with the port is collectively known as the Authority
. A nice explanation here
.
It is called the origin.
More generally speaking, here are the different parts of a URL, as per Location
. (So at least according to how Javascript calls it)
protocol://username:password@hostname:port/pathname?search#hash
-----------------------------href------------------------------
-----host----
----------- origin -------------
protocol
- protocol scheme of the URL, including the final ':'hostname
- domain nameport
- port numberpathname
-/pathname
search
-?parameters
hash
-#fragment_identifier
username
- username specified before the domain namepassword
- password specified before the domain namehref
- the entire URLorigin
-protocol://hostname:port
host
-hostname:port
Note that the exact naming of each part may be different in different standards. For example, 'host' in RFC 6454 section 4. means 'hostname' in the above diagram.