How To Change Your Primary Domain

A primary domain is simply the domain web owners used to purchase their hosting or server space.

Scala Hosting lets users add additional domain names to their hosting accounts, enabling you to have multiple domains in one hosting account.

You can point the new domains to different document roots to upload their web files or to an existing document root to load a live website, which can raise severe duplicate concerns. You could also redirect the traffic to your primary domain.

The primary domain uses the default public_html root folder.

However, you can change your primary domain to any of the alternate domains in your hosting account, and thankfully, this article makes this intuitive.

But first, let’s go through some guidelines and warnings.

Tips Before Changing Your Primary Domain

Kindly pay attention to these details before changing your primary domain name.

  • Changing your primary domain is unnecessary unless you lose ownership of your primary domain and want to remove it from your account.
  • Your websites and email might experience downtime between a few minutes and up to 24 hours, in the extreme, while updating to the new primary domain.
  • Updating to a new primary domain doesn’t often affect your username, password, web files, databases. Still, we recommend backing up your files and databases as a fail-safe measure in case of file corruption.

Changing your Primary Domain

Changing your primary domain could be tricky, but you could get it done following our step-by-step guide.

So, let’s get to it.

Move Your Primary Domain’s Document Root

The document root, also known as the root folder, is a directory in your host’s server that holds your web files, allowing visitors to access them publicly via their browsers.

You’ll need to create a new root folder for your current primary and move all its files and folders from the public_html folder to the fresh document root.

Take these steps to create a new document root and move your web files.

Step 1: Log in to SPanel

Go to your Spanel account—Scala Hosting’s all-in-one control panel using the URL www.domain.com/spanel/login, of course replacing domain.com with your domain name to open its login page.

How To Change Your Primary Domain

Select Control Panel Login, then enter your email address (or username) and password to access your admin dashboard or account’s control panel.

If you log in using admin email and password, SPanel takes you to the admin dashboard but logs you straight to your account’s control panel if you sign in as a user.

Step 2: Choose your Account 

Now, to get to the control panel, scroll to the QUICK LINKS section on your admin dashboard and click List Accounts.

How To Change Your Primary Domain

Go to your account in the account list, then click Actions > Login to log in to its control panel.

How To Change Your Primary Domain

Step 3: Open Your Domains

Scroll to your control panel’s DOMAINS section, and click Domains to open all your active domains.

How To Change Your Primary Domain

Locate your primary domain in the MODIFY DOMAIN section, click the Actions button, then choose Modify Document Root.

How To Change Your Primary Domain

Now, replace public_html in the Document Root text box with your new root folder name, or you could use the domain’s name, for example, domain.com, as the root folder name.

How To Change Your Primary Domain

Kindly click the Change button to apply the changes.

SPanel creates a new but blank document root and points the domain name to it, effectively taking the website offline until you upload your web files to the new folder.

Step 4: Download Your Web Files

To upload your web files to the new document root to load your existing website, go back to your control panel dashboard, scroll to the FILES section and click File manager to open your home directory.

How To Change Your Primary Domain

Find the public_html folder in your home directory.

How To Change Your Primary Domain

Open the folder and click the download icon to save your web files and folders on your local computer as a zip file.

How To Change Your Primary Domain

Step 5: Upload Downloaded Zip File to the New Document Root

Please, locate your domain’s new document root in your home directory, open the folder, click the upload icon and select Upload Zip to add your web files to the empty folder.

How To Change Your Primary Domain

Please, select the downloaded zip file from your computer and click Upload and Unzip to unzip the files to your document root folder after uploading.

How To Change Your Primary Domain

Now, relax as SPanel does the hard work for you.

Cross-reference the two folders to ensure that SPanel moved all the files and inner folders to the new document root. 

Preferably, use an FTP client to download your files to your local computer and move the files safely to your new document root, and at one instant.

After moving all the files, please browse the website to ensure it’s working fine, then delete the public_html folder from the home directory, of course, maintaining a backup copy as previously advised.

Note: please update all processes using your old directory file path, like the FTP accounts and password-protected websites or subdirectories, to the new directory file path.

Define a New Primary Domain for Your Account

Having moved your primary domain, you’ll need to set a new one.

To define a new primary domain for your hosting account, go to your control panel dashboard, scroll to its DOMAINS section, and click Domains.

How To Change Your Primary Domain

Now, locate the domain you wish to make your primary website, modify its document root (as explained earlier) to public_html and click the Change button.

How To Change Your Primary Domain

SPanel creates the root folder and points your domain name to it, and you’ll need to upload files to the new public_html directory to make the website live.

If the domain is an existing website, move the files in its old document root to the public_html folder and update all running processes to the new directory file path.

But if you have a newly registered domain name you wish to make the primary domain, first, you’ll need to add it to your hosting account, point it to the public_html directory and add your web files.

Take these steps to get it done.

Step 1: Add the Domain Name to Your Hosting Account

On your SPanel control panel, go to the DOMAINS section and click Domains.

How To Change Your Primary Domain

Kindly enter your newly registered domain name in the Domain name text box. 

How To Change Your Primary Domain

In the Document Root field, type public_html and click the Add Domain button to add to your hosting account and point to the public_html folder.

How To Change Your Primary Domain

Step 2: Add Your Web Files

Upload your files to the folder to take your primary domain live.

If you wish to run a WordPress website, you could use the one-click installer to install the WordPress script automatically to the document root. 

Then log in to the backend to create your website pages seamlessly, and use your favorite plugins to extend its functionalities.

Taking the Shortest Route

Taking the above steps to change your primary domain could overwhelm anyone, including knowledgeable web admins, so Scala Hosting simplifies the process, taking care of the hard work behind the scenes.

To take this short route, log in to your SPanel account admin dashboard using admin access.

How To Change Your Primary Domain

On the dashboard, click the Manage Accounts tab under the Account Management section at the dashboard’s left panel to open all the accounts you manage as admin.

How To Change Your Primary Domain

If you can’t find that on your dashboard, click List Accounts under the same section or the QUICK LINKS section.

How To Change Your Primary Domain

Find the account you wish to change its primary domain, click Actions > Change Domain.

How To Change Your Primary Domain

Kindly enter the new primary domain in the text box and click the Change button to apply the changes.

How To Change Your Primary Domain

SPanel points your new primary domain to the public_html directory, replacing the previous primary domain—pointing it to a new location. 

Simple, right? 

But note that following this route might delete your subdomains, custom DNS settings, and email forwarders; so always proceed with caution. Also, remember to move the web files to their new locations.

Need Support?

If you need assistance changing your primary domain or have questions, reach out to our support, and we’ll be willing and available to help.

Rado

Author

Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.

Write a Comment

Required*