What is the differences between server and domain name?
A server is a physical piece of hardware. This hardware has multiple IP addressess associated with it. A server is often referenced by referring to one of the IP addresses associated with it, or by the domain name which points to that IP address.
It is worth noting that a server can (and in the case of web sites, usually does) have multiple domains associated with it.
Technically speaking I would argue that it is incorrect to use "server:port" in an HTTP url - it should be domain:port, but it is common practice to do so anyway. In some addressing schemes (like FTP for example) calling it a server makes sense because there is no difference if the server is referred to by (any) domain associated with it or its IP address. [ HTTP has additional logic so the server can determine which domain is being referred to ]
Related videos on Youtube
Comments
-
showkey almost 2 years
An URL is in the format of:
scheme://server:port/pathname
What is the differences between server and domain name here?
//superuser.com/questions/ask
is a (relative) URL.The scheme is omitted (
http:
). The server issuperuser.com
. Maybe the server is equal to the domain name?-
HikeMike over 10 yearsPeople used to type go to e.g.
http://www.example.com
instead ofhttp://example.com
. That's because in the domainexample.com
(of e.g. an organization), the host known by convention aswww
served the web sites of that organization.
-
-
HikeMike over 10 years"Server here means server IP" is nonsense. Also, Google has a lot of IP addresses, 74.125.224.72 is not universal.
-
JdeBP over 10 yearsPerhaps you should expand upon the 'L' of "URL" meaning "locator". The server is identified and located by the host and port in the authority component.
-
davidgo over 10 yearsSorry, but this is wrong. the "//" means "Start of a network path reference", and is not shorthand for anything. [ See Section 4.2 of RFC3986 ]. The leaving out of the http/https part means that this should be derived from already known information - ie this part is relative. Also, http or https are only 2 schemes of a very large number of well over 100 accepted schemese - see en.wikipedia.org/wiki/…
-
Sparky_47 over 10 yearsI'm not talking about the
//
per se. Shorthand refers to the fact that you can omit thehttp(s):
part of a URL, in HTML5. What I said should be read in the context of how the question was asked.