How to Switch the Primary Domain Name With an Addon Domain in cPanel

how_to_switch_primary_domain_with_addon_domain_in_cpanel

Sometimes website owners may want to change their primary domain name and make an existing addon domain the new primary domain of the hosting account.

For example:

  • Primary Domain: domain1.com
  • Addon Domain: domain2.com

You may want to:

  • Make domain2.com the new primary domain
  • Move domain1.com as an addon domain

This can be done in cPanel by following the methods below.

Method 1: Change the Primary Domain Name

This is the easiest method for switching the primary domain with the addon domain.

Step 1: Remove the Addon Domain

Login to your cPanel account.

Then:

  1. Go to the Domains or Addon Domains section
  2. Locate the addon domain
  3. Remove domain2.com from the addon domains list

Step 2: Request Primary Domain Change

After removing the addon domain, you need to change the primary domain name of your hosting account.

You can usually do this from:

  • Client Area
  • Hosting Dashboard
  • Help Desk
  • Domain Change Request Section

Change:

  • domain1.com → domain2.com

Step 3: Add the Old Primary Domain as an Addon Domain

Once the primary domain is updated:

  1. Login to cPanel again
  2. Go to Domains
  3. Add domain1.com as an addon domain

Method 2: Manually Move Website Files

Another way to switch domains is by manually moving website files.

This method is useful if you want more control over the website structure.

Step 1: Backup the Existing Website Files

Create a backup of the website files for:

  • domain1.com

The files are usually located inside:

  • public_html

You can:

  • Download the files
  • Move them to another folder
  • Create a ZIP backup

Step 2: Move Addon Domain Files

Locate the addon domain folder.

Example:

  • /public_html/domain2.com/

Now move or copy all files from the addon domain folder to:

  • public_html

This makes domain2.com use the primary domain directory.

Step 3: Add the Old Domain as Addon Domain

After moving the files:

  1. Open cPanel
  2. Go to Domains or Addon Domains
  3. Add domain1.com as an addon domain

Step 4: Restore Website Files

Upload or restore the backup files for domain1.com into the newly created addon domain folder.

Important Notes

After switching domains, some applications may require additional configuration updates.

Leave a Reply

Your email address will not be published. Required fields are marked *