Is there a specific name when we refer to just the scheme and host of URL, for example http://localhost
of the URL http://localhost:8080/help
?
1 Answer
According to the URL spec from the WHATWG, the combination of scheme and host is a special case of what is called an absolute-URL string. Such a string is (in your case) a URL-scheme string matching a special scheme (e.g. http
), followed by ://
and a valid host string (e.g. localhost
), optionally followed by a :
with a URL-port string (e.g. 8080
), which is again optionally followed by path-absolute-URL string (e.g. /help
).
As you can see, your second string is also called an absolute-URL string by the WHATWG spec. So there seems to be no official name for the combination of only the scheme and a host. In some sense, the scheme+host does not use any of the options available, so you could perhaps call it a minimal absolute-URL string.