Page tree
Skip to end of metadata
Go to start of metadata


This document explains virtual hosts and how cPanel & WHM handles them.

An overly-simplified representation of Internet hosting...

The following overly-simplified outline represents how internet hosting works:

  1. The user requests content from a remote host at a hostname (for example, the domain).


    In most cases, the term domain name can act as a synonym for hostname.

  2. The user’s computer resolves the hostname to an IP address (for example, to
  3. The user’s computer connects to the host with that IP address ( and retrieves the content.

How it really works...

Two significant factors complicate the overly-simplified outline:

  • Multiple hostnames may resolve to the same IP address (for example, and are different hostnames that likely resolve to the same IP address).
  • A shared IP address can serve each hostname's content as long as the user’s computer tells the remote host which hostname’s content to transmit.

To allow multiple hostnames to share content via a shared IP address, we change step 3 above. The user's computer first tells the remote host the hostname's content that it wants. This way, a server that hosts content for the hostname can serve completely different content for the hostname. This happens even though those two hostnames use the same IP address. To the user, the content seems to originate from two different hosts. Because of this, we can say that the remote host has two different virtual hosts (or vhosts) for these names.

A user who requests content and a user who requests content will receive different content. However, a host can also serve the same content for two different hostnames. For example, most users expect the same content from the hostname as when they visit the hostname. Therefore, these two hostnames exist on the same virtual host or vhost.


The rest of this document discusses virtual hosts as they pertain to web hosting. However, virtual hosts can also apply to other services, such as FTP or email.

How cPanel & WHM handles web virtual hosts

cPanel & WHM streamlines how the system handles hostnames and virtual hosts in order to satisfy most common-use cases. Even though this reduces account flexibility, it guides users to generally-desirable configurations.

Every cPanel account owns at least one web virtual host that contains two hostnames:

  • The account’s primary domain name.
  • The equivalent www. subdomain of the account’s primary domain name.

So, if you create the cPanel account example with a primary domain of, then HTTP requests for the hostnames and will retrieve the same content.

cPanel users can manage three different types of additional hostnames in the Domains group of features:

Hostname TypeDescription

How Your Server Handles Domains and Virtual Hosts

(previously Parked Domains )

A separate hostname that the virtual host associates with the account’s primary domain. For example, you can use an alias so that requests to the domain to receive the same content as the domain.

Aliases also configure the equivalent www. domain to associate with the same content (for example, domain).


AutoSSL providers count aliased domains towards their domain and rate limits for virtual hosts.

How Your Server Handles Domains and Virtual Hosts

A hostname that uses the same domain name root as the account’s primary domain or a parked domain, but exists on a separate virtual host (for example, and are subdomains of the domain).

As with aliased domains, the system automatically creates an equivalent www. subdomain of the new subdomain ( in the virtual host for the subdomain.

How Your Server Handles Domains and Virtual Hosts

A separate hostname on a separate virtual host. To accomplish this, cPanel creates a subdomain with the same root as the account’s primary domain (for example, for the addon domain, cPanel would create the subdomain).

Then, cPanel creates the addon domain as an alias of the subdomain (for example, cPanel creates as an alias of the subdomain).

As with aliased domains and subdomains, the system automatically creates an equivalent www. subdomain for each new addon domain (for example, the and domains, which means that every addon domain creates a virtual host with four hostnames).

SSL-encrypted web content

In order to serve SSL-encrypted web content, cPanel creates a new virtual host that mirrors the non-SSL virtual host. This new virtual host adds the necessary configuration parameters for SSL. The same hostnames associate with the new virtual host and the old one, and both virtual hosts use the same document root.

Additional documentation