How to switch my primary domain name with my addon domain?
Let's say that you have one hosting account and two domain names used for two different websites - yourdomain1.com and yourdomain2.com.
The domain yourdomain1.com is the primary domain for your account and yourdomain2.com is hosted as an addon domain,
Here are the steps you should take in order to switch the two domains, i.e. make yourdomain2.com primary for your account and host yourdomain1.com as an addon domain:
- Remove yourdomain2.com from the addon slot from your cPanel -> Addon Domains.
- Change the primary domain name for your account from yourdomain1.com to yourdomain2.com. This can be done via your User Area -> My Accounts -> Manage Account -> Information and Settings -> Change Primary Domain.
- Back up the website files for yourdomain1.com located in the public_html folder and then remove them or place them in another folder.
- Move the files from the addon domain's folder to your public_html directory.
- Add yourdomain1.com to your addon slot from your cPanel -> Addon domains.
- Copy/restore the website files for yourdomain1.com to the newly created addon folder.
Keep in mind that depending on the applications that power both websites, additional modifications to the applications' configuration may be required in order for them to work correctly from their new locations.