HostGator.com » Support Portal

How do I change my primary domain name on my account?

Note: This update to your primary domain name will also update any related subdomains and email accounts to the new name.

Shared and Reseller

You no longer need to ask HostGator to change the primary domain name associated with your account. You can make the change yourself in the HostGator billing tool.

A Pre-Change Checklist

Before you change the main domain on your account, here is a guide that will help ease the transition. Two common scenarios have been listed below.

In the following examples, primarydomain.com is your current domain and newdomain.com is the domain name you are changing it to.

Scenario A: primarydomain.com and newdomain.com are Different Sites

This example is for situations where primarydomain.com and newdomain.com have different content (i.e. are different websites).

  1. The first step is to create a Full Account Backup in the cPanel (this can take a few moments depending on the size of the account).
  2. Login into the cPanel and open the File Manager (or use FTP) and create a folder in the /public_html that is called primarydomain.com.
  3. Move all the files for the primarydomain.com website from the /public_html folder to the folder at public_html/primarydomain.com.

    If you have added subdomains or addon domains to your account, make sure you leave those folders where they are. Moving subdomain and addon domain folders will cause those sites to stop working. In this step, only move the files and folders related to the primarydomain.com website.
  4. Once you have moved all the files for primarydomain.com from /public_html to the public_html/primarydomain.com folder you would then want to move or upload newdomain.com.
    • If you had previously added newdomain.com as an addon domain, you would then want to move all the files from /public_html/newdomain.com to be in the /public_html directory.

      Then go to Addon Domains and remove newdomain.com.

    • If newdomain.com was not previously uploaded as an addon domain, then upload the files for newdomain.com into the /public_html folder instead. If you have a lot of files, FTP would be the best way to do this.
  5. Then you can go through with the domain change using the directions below.
  6. Re-add the primarydomain.com as an addon domain (if you still intend to use it).

Scenario B: newdomain.com will show the content previously on primarydomain.com

This example is for situations where you want the content from primarydomain.com to appear on newdomain.com. You would typically use this example when you are changing the domain of an existing website, and are phasing out the use of the old domain name.

  1. The first step is to create a Full Account Backup in the cPanel (this can take a few moments depending on the size of the account).
  2. Remove newdomain.com from addon domains or parked domains, if it is already there.
  3. Change the primary domain using the directions below.
  4. Add primarydomain.com as a parked domain, if you want to continue using primarydomain.com.
  5. Optionally create a redirect from primarydomain.com to newdomain.com, if you want newdomain.com to show up in the address bar instead of primarydomain.com.

    If you are phasing out use of the old primarydomain.com domain name, then setting up a redirect for awhile will help people find the new domain name.

Note: Steps 4 and 5 are optional. If you simply want primarydomain.com and newdomain.com to show the same content, changing your primary domain name is not necessary. You could create a parked domain with or without redirects and achieve the same effect.

Making the change

  1. Login to the HostGator billing tool, GatorBill.
  2. Go to 'Hosting Packages' and click 'View Hosting Packages'.
  3. Find the package you want to modify and click on 'Change My Domain'.

Note: This will only change the domain setup on the server, it will not register you a new domain.

Dedicated & VPS

Please email support@hostgator.com or create a ticket to support to change your hostname. There is no charge for this service.


Changing addon and subdomain names

You will not need HostGator's billing tool to change your subdomains, addon domains, and parked domains. You can do that directly in cPanel.

Ok, how do I change my addon domain name, but keep the content?

In this example, I will change books123456789.com to books4allofus.com

  1. Register your new domain name
  2. Login to your HostGator cPanel
  3. Click the Addon Domains icon
  4. Write down the "document root" for the old Addon domain [screenshot]
  5. Remove the Addon domain with the old name
  6. Create a new Addon domain with the new name, but use the old "document root" (which you wrote down) as the new "Document Root" value [screenshot]
  7. Now your site has all the same content, but a new URL (domain name address) [screenshot]

Important Notes

Continuing to Use the Previous Primary Domain Name

As mentioned in Step 6 of Scenario A in the Pre-Change Checklist, you would need to re-add the previous primary domain as an addon domain, if you want it to be a separate site.

Alternately, if you want the previous primary domain name, and the new primary domain name to show the same site, you can setup the old primary domain name as a parked domain instead. This will cause both domains to show the same content (specifically the content located in the /public_html folder).

Subdomains

When you change the primary domain on your account, the subdomain names will automatically update from sub.olddomain.com to sub.newdomain.com (for example).

If you want one or more of your subdomains to continue to use the previous primary domain name, you would need to re-add the subdomain, and specify the existing subdomain folder as the Document Root.

Email Accounts and Email Forwarders

When you change the primary domain on your account, the email addresses will automatically update from someone@olddomain.com to someone@newdomain.com (for example).

If you want to continue using the old primary domain name for emails, you will need to re-setup those email addresses either as Email Accounts or Email Forwarders.

Private Name Servers

Changing your primary domain on your account does not effect your existing private name servers. The private name servers with the previous domain name will keep on working (assuming that domain is still active).

Furthermore, changing your primary domain name does not automatically create new private name servers.

If you would like to setup private name servers using your new primary domain name, you would follow the same directions and use the same IP addresses you used for setting up your previous private name servers.

For more details on how to setup private name servers, please read the article on Private Name Servers Setup.

WHMCS

WHMCS must be updated to match any domain name changes. Please email sales@hostgator.com or create a Ticket to Sales so your WHMCS license can be updated.

(Reseller and dedicated server customers get a free license for WHMCS.)


Article Comments

John
What if you are have a resellers account, could resellers change their clients primary domain name?

HostGator
Yes, a reseller or dedicated owner can change the primary domain of his client's cPanel by going to WHM > Modify an Account. However, the owner cannot change his own primary domain; that must be done via the online form.

Ray
By changing the primary domain, will this also change the nameserver name?

HostGator
No, your name servers will remain the same.

You may register new private name servers with the new domain if you prefer.

Chris
When changing the primary domain, what will happen to any mail forwarders that might be set up. Will they get wiped, left where they are or have there domain changed as well?

HostGator
When a domain is removed from your cPanel, the forwarders for that domain are wiped out as well.

Chenzo
If I were to request that my Primary Domain Name be exchanged for one of my current Addon domains (i.e. Placing Add-on Domain in Primary Position and moving Old Primary to an Add-on Position), what impacts would this have on websites being hosted under all domains on the plan (Primary and Add-ons)?

(I ask this because I have noticed that all Add-on domains are in fact created as Sub-Domains of the Primary Domain... Would visitors of websites thereafter not land on error pages due to invalid addresses?)

HostGator
The subdomain names will automatically update from sub.olddomain.com to sub.newdomain.com (for example).

There are no foreseeable problems which will cause websites to break.

Peter
If i was to change my primary domain, would my current primary become an addon domain automatically or would i have to set it up as an addon domain?

HostGator
We remove the old primary domain name, and then you need to set it as a Parked or Addon domain.

Russell
If I change the domain of my reseller account will my WHMCS still be connected to that account?

HostGator
No, you must update WHMCS to match any domain name changes.

John Aberle
If I understand correctly, I want to change an existing add-on domain to my primary, I can't do that?

Additionally, when I do get a new primary domain, what happens to the old primary domain?

Do just need to enter the domain name again under Add Domains?

HostGator
You misunderstood. You CAN change an existing add-on domain to be your primary.

The old primary domain will be completely removed.

Yes, you may then recreate it as an Addon or Parked domain.

Peter
My primary domain expired. But my baby server it's still working and i have some addon domains. Do I have to change one of those addon domains to be a primary? Or can I have the baby server working without primary domain?





HostGator
Your account works fine without a primary domain name.

Some little features in cPanel may become unavailable (like the File Manager file preview).

Christian
When changing a subdomain, is is possible to change the name of the document root folder to the new new subdomain? I would like to use the old domain name for new content, and move the old content to a new domain, and keep the name of the document root folders reflecting the domain names?

HostGator
All you need to do is delete and recreate the subdomain in cPanel.

Deleting an addon or subdomain in cPanel does NOT delete the document root folder. When you recreate it, assign it to any existing folder.

Zenis
I need change my main domain, but a i have a hatchling package. What can i do?. how i can change the main domain?
Thanks,

HostGator
Just submit the form, same as anyone else would.

However, once we change the primary domain name, you will not be able to add the old domain as an addon or parked domain because Hatchling is limited to one domain.

Berry
Good Morning,
I use Drupal CMS, if i change domain names would it change the user name of the data base and the user name. Thanks

"mysql://username:password@localhost/databasename"

HostGator
No, changing your domain name does not change any usernames.

If the username is changed (say for a reseller's client), then the database names associated with that account will change.

Max
I would like to register a new domain name as my primary.

After changing my primary domain name, shall I just point it to the Name Server, everything will work automatically and the new domain name could be used to access my server root?

Where can I find my old domain name to set it as an add-on domain? Is it simply set up within the Cpanel and nothing else?

HostGator
Yes, point your new domain to the same nameservers as your old domain.

Simply add your old domain as a new cPanel or as an Addon domain.

Clive
Hi,
What happens when the old domain name expires? Does that affect anything?

Also, I'm installing into WordPress. Do I have to make any adjustments in the General Settings where the URL is located? And will my Login details remain the same?

Thanks in advance for any help you may be able to offer.

HostGator
If you are not using the old domain anymore, then just let it expire. It won't affect your account if it is using the new domain.

Your login remains the same, but you do need to update your WordPress domain name via the wp-admin panel. Read more at "WordPress Home Fix".

http://support.hostgator.com/articles/wordpress-home-fix

HostGator
Thank you for your comments. Just a quick reminder that the comments on this page are not monitored by technical support staff, and that for support issues, it is best to contact us by live chat, phone or email so we can assist you right away.

Although comments are not monitored by technical support staff, they are moderated and read by technical writers. Comments will need to be approved by a moderator before appearing.

Our technical writers do read the comments periodically for the purposes of updating the articles, and do appreciate your feedback, suggestions and corrections to the articles themselves, as well as any suggestions or tips for readers of this article. However, support questions posted here are not guaranteed to be replied to in a timely manner or at all. For support issues, it is best to contact our support staff instead by live chat, email or phone.



Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment