Ive always wonder how its possible to host many websites on one server.
For example dreamhost can have 100+ pages hosted on one server,
how is this abstracted?

Does it have 1 ip for every webpage hosted?

  • 2
    "Pages" is trivial, but I assume you mean "domains". Commented Feb 26, 2011 at 0:02

1 Answer 1


From the Wikipedia article on Shared Web Hosting:

In name-based virtual hosting, also called shared IP hosting, the virtual hosts serve multiple hostnames on a single machine with a single IP address. When a web browser requests a resource from a web server using HTTP/1.1 it includes the requested hostname as part of the request. The server uses this information to determine which web site to show the user.

In IP-based virtual hosting, also called dedicated IP hosting, each virtual host has a different IP address. The web server is configured with multiple physical network interfaces, or virtual network interfaces on the same physical interface. The web server software uses the IP address the client connects to in order to determine which web site to show the user. The primary reason for a site to use a dedicated IP is to be able to use its own SSL certificate rather than a shared certificate.

From the article on Server Name Indication (SNI):

Server Name Indication (SNI) is an extension to the Transport Layer Security (TLS) computer networking protocol by which a client indicates which hostname it is attempting to connect to at the start of the handshaking process.1 This allows a server to present one of multiple possible certificates on the same IP address and TCP port number and hence allows multiple secure (HTTPS) websites (or any other service over TLS) to be served by the same IP address without requiring all those sites to use the same certificate.

  • The answer here is rather old. There is a modern invention, called SNI and more modern, eSNI. These allow name-based virtual hosts for HTTPS, where each site still has its own certificate, but without the need of dedicated IP addresses. It is widely supported and used. Commented Oct 23, 2019 at 9:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .