Addon Domains, Parked Domains , Sub-Domains explained

From EZP Knowledge Base

Jump to: navigation, search

Often people get confused by the differences between a normal Domain, an Addon domain, a Subdomain and a Parked domain. Here we'll try to explain these concepts by explaining whats happening behind the scenes when you create one.

1. A normal Domain - This is what you get when you use the "Main >> Account Functions >> Create a New Account" function to add a domain from within your WHM reseller control panel. When you push the "create" button, an entry for the domain goes to the Apache web server configuration file with a directive specifying the directory from which Apache will serve content/files when request for the domain name comes in. This directory is known as the "DocumentRoot", on cPanel servers this directory is generally:


/home/username/public_html/

or

/home/username/www/


These directories are actually one and the same thanks to a neat feature called a symlink.

Also the domain gets added to the DNS so that it direct requests to the proper server and set mail server, etc.

2. An AddOn Domain - When you create an addon domain via cPanel, the main differences from a "Normal domain" are:

a) The directory from which Apache serves content for the addon domain must be inside the user home directory of your normal domain. As an example:


/home/username/public_html/addondomain/

or

/home/username/addondomain/


A concern here would be the drive space available to your "Normal domain". That is if you are allocated 100MB for the normal domain and you've created an addon domain then both your normal domain and addon domain share the 100MB drive space. The drive space is determined by your Package.

b) The Addon Domain will share the IP of the "Normal Domain". In many cases this is not a problem, however if you require an SSL Certificate for your Addon domain, it will not work. You will need to setup the domain as a "Normal Domain" through WHM.

3. A Sub Domain - A Subdomain looks like: something.yourdomain.com where yourdomain.com will obviously be your domain. The content for a Subdomain is served from a folder inside your domain's user directory, for example:


/home/username/public_html/subdomain/

or

/home/username/subdomain/


A few uses for subdomains:

You can set 'forums.yourdomain.com' to serve files from a specific directory on your site: '/home/username/www/forums' so that you can use the subdomain in your browser 'http://forums.yourdomain.com' instead of typing 'http://www.yourdomain.com/forums/'.

A more advanced use would be to serve content that is not under the document root at all, such as: '/home/username/forums'.

Also the the name of the directory on the drive doesn't need to match the subdomain name so setting 'forums.yourdomain.com' to serve files from '/home/username/vbulletin-3.1.0' is perfectly valid.

4. A Parked Domain - You can "park" a domain name on top of another domain name. What this does is display the content of the domain you're parked on when you visit the domain that you've parked. An example of this is:


You have a website at domainA.com running and you purchase domainB.com. You want domainB.com to display the same website as domainA.com. There are several ways to accomplish this, but cPanel provides a very easy one with the Parked Domain feature.


When you create a Parked domain, a normal DNS server entry is created. But there will not be a separate apache configuration entry, instead the control panel creates a ServerAlias to your normal domain, thus you have no separate DocumentRoot for holding content. A parked domain always shows up the content of the domain on which it is parked on.