2
$\begingroup$

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 ?

$\endgroup$
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.