Understanding Primary, Alias (or Parked), Addon and Sub domains Друк

  • Addon, Domain, alias, subdomain, addon domain, primary, primary domain, sub domain, alias domain
  • 1

This article will help you to assign additional websites/domain names to your cPanel account either as a Alias / Parked or Addon domains.  It also explains what sub-domains are and how they can be used.

Firstly, it is important to understand the difference between these options and how they relate to your primary domain. This article assumes you are already logged into a cPanel account.

Primary Domain

This is the main domain for your cPanel account.

Your primary domain is served from the public_html/ folder within your home directory. Your home directory is the directory you see when you first connect using FTP.

e.g. a file located in your home directory at /public_html/mypage.html would be served to the world as http://your.primary.domain/mypage.html

PLEASE DO NOT upload your website into the top level directory of your home directory unless you know exactly what you are doing. It usually won't work, and creates a mess!


Alias (or Parked) Domain
Alias domain
To add an Alias domain, simply click the Aliases icon within the Domains section in cPanel (older versions of cPanel will show this icon as Parked Domains)

Enter the new domain and click 'Add Domain'

Create Alias Domain

Once you add an Alias domain to your cPanel account, then both your primary domain, and the Alias domain will open the same website, serviced from your public_html/ directory.

e.g. a file located in your home directory at public_html/mypage.html would be served to the world as both

http://your.primary.domain/mypage.html

http://your.alias.domain/mypage.html

Email and Alias Domains

- Alias domains are treated separately in terms of email handling - i.e. fred@myprimarydomain is a completely different mailbox account to fred@myaliasdomain


Addon Domain
Addon Domain
When you create an Addon domain, you are in effect setting up a new additional virtual host, which means your new domain will have it's own website address e.g. http://my.addon.domain

To add an Addon domain, click the Addon Domains icon withn the Domain section in cPanel.

Create Addon Domain

New Domain Name : Enter the new Addon domain here (don't include the www - the system will automatically work with www as well once you're finished).

Subdomain/FTP Username : cPanel creates a subdomain and an FTP account for the Addon domain. The example shown would create a subdomain called myaddondomain.myprimarydomain - this is primarily to allow the statistics software to function correctly. An FTP account will also be created (if you tick the Create an FTP account... tick box) with a login username of e.g. ftp-username@my.addon.domain and a password matching the one you set in the Password fields.

Document Root : This is where you want to keep the files for your addon website. This is normally a subdirectory of your public_html/ directory, and by default it uses the domain name you are adding as the name of that directory, e.g. public_html/addondomain.co.uk - however, you can chose any directory name you like.  If you are going to host several websites, then it is a good idea to place the document root at the top level, so instead of the Document Root (below) saying public_html/domain2.com it would simply say domain2.com - This avoids a number of problems that can arise from the use of mod_rewrite in your primary domain.

In the above examples then either /public_html/myaddondomain.co.uk/myfile.html (document root as sub-domain under public_html) or /myaddondomain.co.uk/myfile.html (document root at top level) would be served to the world as http://myaddondomain.co.uk/myfile.html

IMPORTANT NOTES

- if you are adding a handful of domains with the same basic name (e.g. domain2.com, domain2.co.uk, domain2.org etc) then you might get a message saying that the Subdomain or FTP User already exists. This is because cPanel will, by default, try to use the first part of the domain name for the Subdomain/FTP username, so you will have to change the default to something else for each of your domains.

Email and Addon Domains

Addon domains are treated separately in terms of email handling - i.e. you can maintain mailboxes for all of your domains entirely independently.


Subdomains
subdomains
A subdomain is a subsection of your website that can exist as a new website without a new domain name. You can use subdomains to create memorable URLs for different content areas of your site. For example, you can create a subdomain for your blog that is accessible through blog.example.com and www.example.com/blog

To create a subdomain, click the Subdomains icon withn the Domain section in cPanel.

create subdomain

Subdomains can also be used to create entirely separate websites, for example if you have www.myprimary.domain you could add a sub-domain to allow whmcs.myprimary.domain.

Although if you are a reseller you might want to consider adding an entirely separate cPanel account through WHM - which you can also do using a subdomain of another domain in your account.

Email and subdomains

Subdomains domains are treated separately in terms of email handling - i.e. you can maintain mailboxes for all of your domains/subdomains entirely independently. 


Ця відповідь Вам допомогла?

« Назад