Let’s assume say that you have registered for one hosting account and two domain names. You are utilizing these two domain names for different websites example – domain1.com and domain2.com.
The domain – domain1.com is the primary domain for your hosting account and domain2.com is the addon domain.
The necessary steps that you should perform for switching the two domains are mentioned below. That is steps to make domain2.com as the primary domain and host domain2.com as the addon domain.
Step 1 : Remove domain2.com from the addon list by logging into cPanel and going to ‘addon domains’.
Step 2 : Modify the primary domain name for your hosting account from domain1.com to domain2.com. You can execute this from going to – Help Desk > Domain name change.
This completes the process of switching the domain names. This is one way. Another way of modifying the domain names is given below:
Step 1 : Create a backup of the website files for domain1.com that is situated in public_html folder and then remove these files or save them in some other folder.
Step 2 : Transfer the files from the addon domains folder to the public_html directory.
Step 3 : Add domain1.com to your addon domains list through cPanel > Addon domains.
Step 4 : Copy or restore the website files for domain1.com to the addon folder that is newly created.
Pleased note that on the basis of the applications you are utilizing, additional modifications might be needed for configuring these applications so that they function perfectly from the new locations.