Domains and Vhosts Guide
Posted 04th Oktober, 2018
cPanel is a form of virtual hosting which means that multiple websites can run from a single server, with the website content running from different document roots.
All cPanel accounts have a primary domain. By default, this domain name will point to your public_html
folder. Additional domains can be added to cPanel as addon domains and parked domains (aliases).
Contents
- Parked Domains (Aliases)
- Addon Domains
- Subdomains
- WHM and Reseller Accounts
Parked Domains
Parked Domains act as aliases for the primary domain. They also point to the website's root public_html
folder. This may be used, for example, when pointing variations of a domain name (a .net and a .com) to the same site.
Parked domains enable the same features of the main domain, for instance email addresses and redirects.
It is important to set redirects so that the parked domain redirects to the main domain, or vice versa. If two websites load the same content there may be an SEO penalty for duplicate content.
Addon Domains
Addon Domains create a website running from an entirely separate document root within the cPanel structure. For instance if the main domain runs from /public_html/
, the addon domain might run from /public_html/addondomain/
or just /addondomain/
).
In our view, addon domains are less than ideal and can lead to security complications. It is far better to isolate a website to a standalone cPanel account.
Subdomains
A subdomain is a prefix to a domain, for example mail.domain.com
or shop.domain.com
or blog.domain.com
.
Subdomains can be created for any cPanel domain, including addon and parked domains. They allow you to point domain prefixe to specific folders in the web hosting space, or to redirect them elsewhere.
Note that subdomains are distinct from DNS records, which should instead be configured with a domain's DNS provider.
Add a Subdomain
- Log in to the cPanel account and click the
Subdomains
icon, which can be found underDomains
. - Follow the steps on the page to name the new subdomain. If addon or parked domains are added, these can be selected in a drop down box.
- Set a subdomain file location under the Document Root dropdown. As standard, cPanel will set the subdomain's file location to be public_html/subdomain.
WHM and Reseller Accounts
Web Host Manager (WHM) is the reseller layer that sits on top of cPanel and can be used for managing multiple cPanel accounts. Reseller accounts, or server administrators, use WHM to create and manage the cPanel accounts of their customers.
To create a cPanel account under WHM do the following. A WHM reseller account is required.
- Log in to WHM.
- Using the search box in the top right hand corner type
Create a New Account
. - Enter the following:
- The domain name. This will become the primary domain name.
- A username. This is autogenerated but can be modified.
- A desired password, usually with required strength.
- An email (optional), which will receive notifications.
- A desired package
- There are also some advanced options, which can be left as default.