How to add an addon domain for a new website with unique domain, subdomain, alias/parked domains

1

Go to Domains section of your cPanel, you will see these icons to click depending on your need :

Domains management by cPanel


Addon domains / Subdomains (means adding a website) :
When creating an addon domain (icon Addon Domains) or subdomain (icon Subdomains), you will add a website in your hosting account, a folder is created by default with its related domain name (it is technically called : Document Root), it will be located outside of public_html and it is in this folder that you will have to put the files of the new website. You can add a domain whose sole purpose is to redirect to a domain other than the main one of your cPanel account, add domain and a redirect. 

- make sure you have updated with the DNS given when ordering your hosting plan and wait the necessary propagation time...
- if you do not use our DNS, find your IP in the Zone editor of your cPanel, then make an entry A in the DNS zone of your registrar, then create your domain/subdomain in your cPanel and wait the necessary propagation time...

Alias :
Alias domains are parked domains. The only reason of alias domain is to load automatically the content of folder public_html : the main domain of your account.
(using redirect here is not recommended as this modify htaccess of the main domain of your account, use instead an addon domain + redirect)
NB : make sure you have updated with the DNS given when ordering your hosting plan and wait the necessary propagation time, or pointing to correct IP...


Remarks :
1 - To update folder where files of your website is stored, you can do this at any time on an existing domain, go to addon domains, and click on modify 'Document Root', input the desired folder name. After, check/move files from the website from old folder to the new folder using the file manager of cPanel, do select and move with your mouse. Finally, delete the old empty folder

2 - If you make a change after you installed a SSL, you must first uninstall the SSL, move your site (step 1) and then reinstall SSL
3 - To add a domain or subdomain with special character or accent, you must convert it to ASCII before you can add it to cPanel :
https://www.verisign.com/en_US/channel-resources/domain-registry-products/idn/idn-conversion-tool/index.xhtml?loc=en_US

4 - cPanel has an imperfection when adding any domains, it creates a domain alias that is similar to a subdomain of your main cPanel account domain, so that depending on the CMS/website, your website (domain added) can also be accessible from this alias/subdomain ...
The solution to add this to your .htaccess file, replace the name of the subdomain and domain with the right values :

Rewritecond %{HTTP_HOST} ^subdomainaddon.maindomaincpanel.com$
Rewriterule ^(.*) http://www.youraddondomain.com/$1 [QSA,L,R=301]

Other remark :

  • When setting up a domain redirection to another, if you check the "Wild Card redirect" option, this will redirect all links from folders and pages from the old domain to the equivalent on the new domain
  • If you wish to send emails from a subdomain, you must replicate manually SPF value same as main domain related in 'Zone editor'

Also Read

How to migrate my website to you ?

We offer free website transfer with following conditions : Plans until EURO 1 : upto 3...

Where to find a webmaster

Web agency cheap in Maroc (30€/hour) : https://www.pyxicom.com India :...

How to check the resources used in cpanel

You can regularly verify the usage resources history by your account via your cPanel, section...

Optimal technique for DNS update

The DNS to be inserted for your hosting service are mentioned in the email of access that...

PHP versions, extensions, and cache

In your cPanel, you can change PHP version, go in section Softwares, icon 'Select PHP version'(If...