To do this you must add the new domain name as an addon one from your cPanel -> Addon Domains tool and set the Document Root to match the one of the subdomain. This way, when you access the addon domain name it will open the application on the subdomain.
Addon Domains Tutorial
Learn what are and how to manage addon domains
This tutorial covers the following topics:
* Add an Addon Domain
* Remove an Addon Domain
Through the Addon Domains tool you can add addon domains to your account. An addon domain allows you to reach a domain when entering the name of the addon domain into a browser. This means that you can host additional domains in your account.
The Addon Domains tool is located in the Domains section in cPanel.
Add an Addon Domain
To add an addon domain name, first open the Addon Domains tool in cPanel. On the page that loads there are several fields, which need to be filled:
New Domain Name - the addon domain name, i.e. addondomain.com
Subdomain or FTP Username - this field is automatically populated when you input the new addon domain name, but you can change it if you want. In cPanel, when you create an addon domain name, a subdomain is added automatically for it, as well as an FTP user that has access to the document root folder of the addon domain. The information you put here will be the name of the new subdomain and the name of the new FTP account.
Document Root - the document root of the newly created addon domain name
Password - the password for the new FTP user that will be created
Password (again) - the same password as in the field above
Once you have provided the necessary information in the fields, click the Add Domain button to add the domain name to your account as an addon one.
That's it! The domain name has been added as an addon one to your account.
Remove an Addon Domain
To remove an addon domain name, first access the Addon Domains tool in cPanel. You will be presented with a list of all the addon domains on your account.
To remove an addon domain name, click the Remove button next to the entry for the domain.
A new page will open, on which you will be prompted if you want to remove the FTP account associated with the addon as well. To proceed, click the Remove button.
That's it! The addon domain name is removed from your account.