cPanel Overview & Login

Primary Domain Change in cPanel / WHM Complete Guide

By the Domain India teamPublished 7 min read
Knowledge base article
Contents (9 sections)

The primary domain, also called the main domain, is the domain your cPanel hosting account was created for. Its website lives in the public_html folder. You might want to change it after a rebrand, or when a second website on the account should become the main one. On Domain India cPanel hosting, support makes the change for you, because it is done at server level in WHM, which shared hosting accounts can't open. This guide explains what changes, what stays, and exactly what to tell support.

Key takeaways

Changing the primary domain does not create a new website and does not touch your files: whatever is in public_html becomes the site for the new domain. Before you ask, point the new domain at your hosting and take a backup. Then open a ticket with the current domain, the new domain and whether the new domain is already on the account. Only if you want an addon domain's website to replace your main site do files move, and support does that only with your written confirmation.

1. Primary, addon and alias domains

A cPanel account can serve several domains, but only one is the primary:

TypeWebsite folderWhat it shows
Primary (main) domainpublic_htmlYour main website
Addon domainIts own folder, chosen when the addon was createdA separate website
Alias (formerly "parked") domainpublic_htmlThe same website as the primary domain

For more on the difference, see parked, addon and subdomains.

2. What changes and what stays

  • Your files stay where they are. The content of public_html becomes the website for the new domain.
  • Databases stay. Nothing is copied or deleted.
  • Your cPanel username and password stay the same.
  • The SSL certificate is reissued. Free AutoSSL covers the new domain once it points to the server.
  • Links inside your site may still use the old domain. Apps such as WordPress store their address in the database, so they need updating (section 6).
  • Email addresses on the old domain need a decision. Tell support which mailboxes you use, so the change is planned around them.

3. Which case are you in?

What support needs to do depends on whether the new domain is already on your account.

New domain todayWhat support doesYour files
Not on the accountChanges the primary domainpublic_html unchanged
An alias of the primary domainRemoves the alias, then changes the primary domainpublic_html unchanged
An addon domain, and your current main site should stayRemoves the addon entry, then changes the primary domainpublic_html unchanged; the addon folder stays until you ask to delete it
An addon domain, and its website should become the main siteReplaces public_html with the addon website, removes the addon entry, changes the primary domainpublic_html replaced, only with your written confirmation
Replacing public_html cannot be undone by itself

The last case removes or overwrites the website currently in public_html. Support will ask you to confirm in writing first. Download a full backup before you confirm, so you can recover the old site if you need it.

4. Prepare before you ask

  1. Point the new domain at your hosting.
    Use the nameservers or server IP shown on the Point a domain to this hosting card of your hosting service in the client area. See how do I change my nameservers.
  2. Take a backup.
    Open JetBackup 5 in cPanel and download a copy of your files and databases. See backup and restore with JetBackup.
  3. List your mailboxes.
    Note which email addresses on the old domain are in use.
  4. Decide about the old domain.
    If you keep owning it, it can stay on the account as an alias so old links and bookmarks still reach your site.

5. Ask support to make the change

Open a ticket at /client/support/new and include:

  • the current primary domain and the new domain;
  • which case from section 3 applies;
  • for the last case, a clear written confirmation that the website in public_html may be replaced by the addon website;
  • whether the old domain should stay as an alias, and which mailboxes you use.

You can also start on the 24/7 live chat. Tickets get a first response within 15 minutes; the change itself is scheduled with you.

6. After the change

  • Check the site on the new domain. The cPanel servers cache pages for a while, so add ?t=1 to the address to see the live version.
  • Update WordPress. If the site still redirects to the old domain, change WordPress Address and Site Address in Settings › General to the new domain, then replace old links in the content with a search-and-replace plugin. If jailed SSH is enabled on your account, WP-CLI's wp search-replace does the same.
  • Check HTTPS. AutoSSL issues the certificate for the new domain once its DNS points to the server; if the browser still warns after a few hours, tell support.
  • Redirect the old domain. If the old domain stays as an alias, add a 301 redirect to the new domain so search engines move their ranking across. See redirect non-www to www for .htaccess redirect examples.

7. DirectAdmin and Webuzo

On Domain India DirectAdmin hosting, users can rename a domain themselves from Account Manager › Domains, with the RENAME DOMAIN button. Each DirectAdmin domain has its own folder, so there is no single public_html to replace. Take a backup first, and if you can't find the option, ask support.

On Webuzo, ask support.

8. Domain India hosting

Domain India cPanel and DirectAdmin hosting include free SSL and weekly JetBackup backups, taken every Sunday with the last 5 copies kept. Support is available on 24/7 live chat and by ticket; there is no phone support.

Frequently asked questions

Can I change my primary domain myself in cPanel?

No. On shared hosting the primary domain is changed at server level in WHM, which customer accounts can't open. Open a support ticket with the current and new domain, and support makes the change.

Will changing the primary domain delete my website?

No. Your files in public_html and your databases stay as they are, and become the website for the new domain. Files are replaced only if you ask for an addon domain's website to become the main site and confirm it in writing.

My new domain is already an addon domain on my account. What happens?

Support removes the addon entry and then changes the primary domain. Tell support whether your current main site should stay, or whether the addon website should replace it; the second option needs your written confirmation.

Do I need to update WordPress after the primary domain changes?

Usually yes. Change WordPress Address and Site Address in Settings, General, to the new domain, then replace old links in the content with a search-and-replace tool.

Does my cPanel username change with the primary domain?

No. The username and password stay the same.

Can I change the main domain on DirectAdmin?

On Domain India DirectAdmin hosting, users can rename a domain from Account Manager › Domains. Take a backup first, and ask support if you can't find the option.

Ready to switch? Point the new domain at your hosting, download a backup, and open a ticket with the details from section 5. Not a customer yet? See cPanel hosting.

Need your primary domain changed?

Tell us the current domain, the new domain and which case applies, and support will plan the change with you.

Open a ticket

Ready when you are

Get cPanel hosting from ₹125/mo + GST

See plans

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
Change the Primary Domain on cPanel Hosting | Domain India