How to Change Your Main Domain in cPanel: A Complete Step-by-Step Guide
To change the main domain associated with your cPanel account, you must typically update the primary domain setting through your hosting provider’s billing portal or Web Host Manager (WHM). Because the "Main Domain" is the root identif...
To change the main domain associated with your cPanel account, you must typically update the primary domain setting through your hosting provider’s billing portal or Web Host Manager (WHM). Because the "Main Domain" is the root identifier for your hosting partition, this change cannot usually be performed from within the standard cPanel user interface itself. You will need to update your DNS records and reconfigure any applications, like WordPress, to match the new URL.
Contents
In 2026, cPanel remains the industry standard for web hosting management, yet one of the most common points of confusion for users is the inability to find a "Change Main Domain" button within the cPanel dashboard. This is because the primary domain is hard-coded into the account's configuration files at the server level. Changing it involves more than just a surface-level rename; it affects file paths, email structures, and database pointers.
Whether you are rebranding your business, switching to a better Top-Level Domain (TLD), or simply correcting a typo made during registration, this guide provides the technical roadmap to successfully transitioning your cPanel account to a new primary domain.
Understanding the "Main Domain" vs. Addon Domains
Before initiating a change, it is vital to distinguish between the various types of domains within the cPanel ecosystem. The Main Domain (or Primary Domain) is the domain used to create the hosting account. It defines the root directory—usually /public_html/—and dictates the default username for the account.
In contrast, Addon Domains are separate websites hosted under the same cPanel account, typically pointing to subfolders (e.g., /public_html/newsite/). While you can easily add or remove Addon Domains, the Main Domain is the structural foundation. Changing it is a "top-down" operation that impacts every service linked to the account, including FTP accounts, SSH access, and SSL certificates.
Prerequisites and Critical Precautions
Changing a primary domain is a significant administrative action. In 2026, security protocols and automated backups make this safer than in previous decades, but several manual steps remain essential to prevent data loss or extended downtime.
1. Perform a Full Account Backup
Do not rely solely on your host’s automated backups. Log into your cPanel and use the Backup Wizard to download a "Full Backup." This includes your home directory, MySQL databases, email forwarders, and filters. If the domain transition fails or corrupts a configuration file, you will need this archive to restore your site.
2. Verify Ownership of the New Domain
Ensure the new domain is already registered and that you have access to its DNS management settings. If you are moving a domain from another registrar, make sure the "Transfer Lock" is off or that you have updated the Nameservers to point to your current hosting provider.
3. Documentation of Current Settings
Note your current IP address and specific DNS records (A records, MX records for email, and TXT records for SPF/DKIM). While many hosts migrate these automatically when the main domain changes, custom records often require manual re-entry.
Method 1: Changing the Main Domain via Hosting Provider Portal
For the majority of users on shared hosting plans, you do not have access to the server-level tools required to change the main domain directly. Instead, you must use your hosting provider’s customer dashboard.
Step 1: Log into Your Billing Area
Access the client portal of your hosting company (e.g., Bluehost, SiteGround, HostGator, or A2 Hosting). These portals serve as the administrative layer above cPanel.
Step 2: Locate the Hosting Management Section
Navigate to "My Services" or "Hosting Management." Select the specific hosting plan associated with the domain you wish to change. In 2026, most major hosts provide a "Modify Domain" or "Change Primary Domain" tool within these settings.
Step 3: Submit the Change Request
Enter the new domain name. Some providers offer this service for free, while others may charge a small administrative fee. If an automated tool is not available, you will need to open a support ticket. Specify that you want to "Change the Primary Domain of cPanel account [username] from [old-domain.com] to [new-domain.com]."
Step 4: Confirm Propagation
Once the host processes the change, cPanel will update its internal references. Note that your cPanel login URL may change from old-domain.com/cpanel to new-domain.com/cpanel.
Method 2: Changing the Main Domain via WHM (For VPS and Resellers)
If you have a Virtual Private Server (VPS), a Dedicated Server, or a Reseller account, you have access to WHM (Web Host Manager). This allows you to change the main domain for any account under your control without contacting a third party.
Step 1: Access WHM
Log into WHM using your root or reseller credentials. Usually, this is accessed via port 2087 (e.g., https://your-server-ip:2087).
Step 2: Navigate to "Modify an Account"
In the left-hand search bar, type "Modify an Account." Select the account you wish to edit from the list and click the "Modify" button at the bottom of the page.
Step 3: Update the Domain Field
Find the text box labeled Primary Domain. Delete the old domain and type in the new one. Ensure there are no trailing spaces or "http://" prefixes.
Step 4: Adjust the Username (Optional)
Changing the domain does not automatically change the cPanel username. If you want the username to reflect the new brand, you can change it here as well. However, be aware that changing the username will change your database prefix and FTP login details, which may break existing scripts.
Step 5: Save Changes
Scroll to the bottom and click "Save." WHM will then run a script to update the Apache configuration, the DNS zone files, and the user's home directory path.
Post-Change Configuration: Technical Checklist
Simply renaming the domain in cPanel is only half the battle. Your website will likely remain inaccessible or broken until you complete these post-migration steps.
| Task | Description | Importance |
|---|---|---|
| DNS Update | Point the New Domain's A Record to your server's IP address. | Critical |
| SSL/TLS Reissue | Generate a new Let's Encrypt or Sectigo certificate for the new domain. | High |
| CMS URL Update | Update site_url and home in WordPress or other CMS databases. |
Critical |
| 301 Redirects | Route traffic from the old domain to the new one via .htaccess. |
SEO/Traffic |
| Email Accounts | Re-create or rename email addresses to match the new domain. | High |
Updating DNS Records
After the cPanel change, your new domain must point to the hosting server. In your DNS manager (at Cloudflare, Namecheap, or your registrar), update the A Record to match the IP address of your cPanel account. Set the TTL (Time to Live) to a low value (e.g., 300 seconds) during the transition to speed up propagation.
Fixing WordPress and Database Links
If you are using WordPress, your site will not load correctly because the database still expects the old domain. You must update the wp_options table.
- Log into phpMyAdmin from cPanel.
- Select your site's database.
- Find the
wp_optionstable. - Update the
siteurlandhomerows with the new URL. - Use a "Search and Replace" plugin or script (like Interconnect/it) to update all internal links within your posts and pages.
Reconfiguring Email Services
When you change the main domain, your old email addresses (e.g., contact@old-domain.com) effectively cease to function as primary accounts. If the hosting provider renamed the account, you may need to manually recreate these mailboxes under the new domain. Furthermore, you must update the settings in your email clients (Outlook, Gmail, or Apple Mail) to reflect the new incoming and outgoing mail server addresses.
SEO Considerations: Implementing 301 Redirects
To preserve your search engine rankings, you must inform Google that your content has moved permanently. This is done via a 301 redirect in your .htaccess file, located in the /public_html/ directory.
Add the following code to the top of your .htaccess file:
RewriteEngine On RewriteCond %{HTTP_HOST} ^old-domain\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.old-domain\.com$ RewriteRule (.*)$ https://www.new-domain.com/$1 [R=301,L]
This ensures that any user or crawler visiting a link on your old domain is automatically sent to the corresponding page on the new domain, passing over the "link equity" and minimizing 404 errors.
Common Troubleshooting Scenarios
Issue: "The domain is already configured on this server." This occurs if you previously added the new domain as an "Addon Domain" or "Alias." You must delete the Addon Domain from the cPanel interface before you or your host can promote it to the "Main Domain."
Issue: "SSL Certificate Name Mismatch" After a domain change, your browser may show a "Your connection is not private" error. This is because the existing SSL certificate is still issued to the old domain. In cPanel, go to SSL/TLS Status and click "Run AutoSSL." In 2026, most servers will resolve this automatically within 30 minutes, but a manual trigger can speed up the process.
Issue: White Screen of Death (WSOD)
This is usually caused by hard-coded file paths in configuration files (like wp-config.php or configuration.php for Joomla). Ensure that any path referencing /home/olduser/public_html is updated to the new user path if the username was changed during the migration.
Frequently Asked Questions
Can I change my main domain without losing my emails?
Yes, but it requires caution. If only the domain name changes and the username stays the same, your email data usually remains in the /mail/ folder. However, if the username changes, the file path to those emails changes too. Always back up your mail folder via FTP before making the change so you can re-upload it to the new directory if necessary.
How long does it take for the new domain to start working?
The cPanel update itself is nearly instantaneous. However, DNS propagation—the time it takes for servers worldwide to recognize the change—can take anywhere from 1 to 24 hours. Using a tool like DNSChecker can help you monitor the progress across different geographic regions.
Do I need to buy a new hosting plan to change my domain?
No. You do not need a new hosting plan. Your existing plan can be pointed to any domain you own. Changing the main domain is a configuration update, not a new purchase, though some hosts may charge a small service fee for manual labor if an automated tool isn't available.
Will changing the main domain delete my website files?
Changing the main domain will not delete your files in /public_html/. The server simply changes the "pointer" for the domain. However, because database entries and internal links rely on the domain name, the website will appear broken until you update those internal references to match the new URL.
Can I change my main domain multiple times?
Technically, yes. There is no limit to how many times a domain can be changed in WHM or through a host's portal. However, frequent changes are discouraged because they can confuse search engines, break backlinks, and lead to configuration errors if old DNS records are not properly cleaned up.
Final Recommendation
When changing your main domain in cPanel, the most critical step is the Search and Replace operation within your database. Most users successfully change the domain at the server level but fail to update the application layer, leading to broken images and CSS. After your host confirms the change, immediately prioritize installing an SSL certificate and updating your CMS settings. For long-term SEO health, keep your old domain active for at least 12 months with a global 301 redirect to ensure all legacy traffic is successfully captured and routed to your new digital home.