This article is intended for customers and administrators who need to change the main (primary) domain of an existing cPanel account.

The change is performed from WHM → Modify an Account and has important implications for websites, email, FTP access, and DNS configuration.

Only reseller accounts have access to WHM and can perform this action themselves.
Customers with regular web hosting accounts must request this change via a support ticket, and it will be carried out by us.

Changing the main domain should be planned carefully, as it can result in temporary downtime depending on the account setup.


Notes Before You Start

  • Changing the primary domain does not change:

    • The cPanel username

    • Home directories

    • File ownership and permissions

  • Changing the primary domain does update:

    • Email account usernames that include the primary domain

    • FTP and Web Disk usernames that include the primary domain

    • The account’s DNS zone

  • The primary domain’s document root is always public_html and cannot be changed at the moment

  • A full account backup is strongly recommended before proceeding


Important: DNS Considerations

When the main domain is changed:

  • The DNS zones of both the old and new domains are reset to default

  • Any custom DNS records will be lost, including:

    • Custom A or AAAA records

    • MX records

    • SPF, DKIM, and DMARC records

    • CNAME records

    • Third-party service records (email providers, payment gateways, verification records, etc.)

Before proceeding:

  • All custom DNS records must be noted and provided in the related support ticket

  • These records will need to be re-added manually after the domain change

Failure to do this may result in email delivery issues or service outages.


Scenario 1: Replacing the Main Domain With a Completely New Domain

This is the simplest and most straightforward scenario.

Typical Use Case

  • The existing main domain is no longer required

  • A brand-new domain will fully replace it

  • No addon or alias relationship exists between the domains

What Happens

  • The old main domain is replaced with the new domain

  • Existing:

    • Email accounts

    • Email forwarders

    • Email filters

    • FTP accounts

    • Web Disk accounts
      remain in place and are automatically updated to use the new domain

  • Website files remain in public_html

  • DNS is reset and recreated for the new domain

Website Considerations

If a website already exists:

  • URLs may need to be updated in:

    • Databases (e.g. WordPress site URL)

    • Configuration files

    • Hard-coded links

Alternatively:

  • The existing website can be removed

  • A completely new website can be deployed for the new domain

This scenario is recommended when you want the cleanest transition with minimal manual reconfiguration.


Scenario 2: Replacing the Main Domain With an Existing Addon or Alias Domain

This scenario is more complex and requires additional preparation.

Typical Use Case

  • The new main domain already exists on the account as:

    • An addon domain, or

    • An alias (parked) domain

Required Preparation

Before the domain can be promoted to the main domain:

  • The addon or alias domain must be removed

  • All sub-domains related to that domain must also be removed

Impact on Services

  • Email accounts usually remain in place unchanged

  • The following are removed automatically and must be recreated manually:

    • Email forwarders

    • Email filters

    • FTP accounts

    • Web Disk accounts

Changing the Main Domain

Once the addon/alias domain and its sub-domains are removed:

  • The account can be modified

  • The domain can be set as the new primary domain

File Structure Changes

After the domain becomes the main domain:

  • Website files must be moved from the previous document root (e.g. /public_html/addon-domain/)

  • Files must be placed into:

    • /public_html

  • Existing files in public_html must be:

    • Removed, or

    • Moved to a temporary directory first


Optional: Re-Adding the Old Main Domain

After the change:

  • The old main domain can:

    • Remain removed, or

    • Be re-added as an alias or addon domain

  • If re-added as an addon domain:

    • Website files must be moved from public_html to the new addon domain’s document root


Downtime Expectations

Changing the main domain may cause downtime, depending on:

  • DNS propagation

  • Website complexity

  • Required database or configuration changes

  • Email reconfiguration

Downtime can range from a few minutes to several hours.


Related Articles


Summary and Recommendations

  • Always take a full backup before proceeding

  • Document and provide all custom DNS records

  • Perform the change during low-traffic hours if necessary

  • Test thoroughly after completion:

    • Website loading

    • Forms and checkout processes

    • Email sending and receiving

  • Update:

    • CMS site URLs

    • Hard-coded links

    • Third-party integrations

Scenario Complexity Email Impact Manual Work
New domain replaces old main domain Low Minimal Low
Addon/alias domain becomes main domain High Partial High

If you are unsure which scenario applies to your account or would like assistance, please contact our technical support team.

Updated by SP on 23/12/2025

Was this answer helpful? 0 Users Found This Useful (0 Votes)