User Agents

Web browsers and everyday web tech, explained

Change Addon Domain Name: A Step-by-Step Guide

· 5 min read · Extensions

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Changing the domain name used with an addon domain allows you to migrate a website's identity or correct a naming error without deleting your existing files. In most hosting environments, an addon domain is essentially a subfolder in your primary account that is mapped to a separate domain name. To change this, you must remove the existing addon association and create a new one, as most control panels do not allow you to simply rename a domain entry for security and configuration reasons.

What You'll Need

  • Access to your hosting control panel (such as cPanel, DirectAdmin, or Plesk).
  • The new domain name, already registered and owned.
  • Access to your domain registrar's DNS settings.
  • A full backup of the website files and database associated with the addon.

Step-by-Step

  1. Perform a Full Backup: Before making any structural changes, use your hosting File Manager or an FTP client to download all files in the addon domain's directory. Export your SQL database via phpMyAdmin. This ensures that if the pathing breaks during the transition, you can restore the site.
  2. Update DNS Records: Log in to your domain registrar and point the A record of the new domain to your hosting server's IP address. If you are using nameservers, ensure the new domain is pointed to the correct hosting nameservers. This must be done first to avoid downtime during the setup.
  3. Remove the Old Addon Domain: Navigate to the "Addon Domains" or "Domains" section of your control panel. Find the current domain name and select "Remove." Crucial: Ensure that the option to "Delete Document Root" is unchecked. You want to remove the domain mapping, but keep the actual files and folders on the server.
  4. Add the New Domain: In the same "Addon Domains" section, enter the new domain name. When prompted for the "Document Root," enter the exact path to the folder where the old domain's files are located (e.g., public_html/old-domain-folder). This links the new domain name to the existing content.
  5. Update Application URLs: If you are using a CMS like WordPress, the site will not load correctly because the internal database still points to the old URL. Log in to phpMyAdmin, locate the options table, and change the siteurl and home values to the new domain name.
  6. Search and Replace Database Links: Use a database search-and-replace tool to find all instances of the old domain URL in your database and replace them with the new one. This fixes broken images and internal links.
  7. Configure SSL/TLS: Navigate to the "SSL/TLS Status" section of your control panel. Run "AutoSSL" or manually install a certificate for the new domain to ensure the site loads over HTTPS.
  8. Test the Site: Open a private browser window and enter the new domain. Check all pages, forms, and images to ensure the migration was successful.

Common Mistakes

  • Deleting the Document Root: The most frequent error is checking the box to delete the folder when removing the old addon domain. This wipes the entire website, making the process a restoration from backup rather than a simple domain change.
  • Ignoring DNS Propagation: Attempting to add the domain to the control panel before the DNS has propagated can sometimes lead to "Domain not pointing to our servers" errors.
  • Forgetting Database Updates: Changing the domain in the control panel only changes the "doorway" to the site; it does not change the internal links within the site's content.
  • Skipping the Backup: Assuming the process is risk-free and failing to backup files can be catastrophic if a mistake is made during the removal phase.

Tips

  • Use a Staging Site: If the website is high-traffic, perform this change on a staging environment first to identify any hard-coded paths that might break.
  • Implement 301 Redirects: To preserve SEO rankings, add a 301 redirect in the .htaccess file of the old domain (if you still own it) to point all traffic to the new domain.
  • Clear Cache: After the change, clear your browser cache and any server-side caching (like LSCache or Varnish) to see the changes immediately.

Troubleshooting

If the site returns a 404 error after the change, verify that the Document Root specified in the Addon Domains section exactly matches the folder name in your File Manager. A single typo in the path will prevent the server from finding the files.

If you see a "Too many redirects" error, this is often caused by a conflict between the .htaccess file and the new domain settings. Rename your .htaccess file to .htaccess_old to see if the site loads; if it does, you will need to regenerate your permalinks.

If the site loads but images are missing, check the database. This usually means the search-and-replace process missed some entries or the images were linked using absolute paths that were not updated.

Frequently Asked Questions

Will changing the addon domain delete my files?

Not if you specifically choose to keep the Document Root when removing the old domain from your control panel.

Do I need to buy a new hosting plan?

No, as long as your current plan allows for multiple addon domains, you can swap them within the same account.

How long does the change take to reflect?

The control panel change is instant, but DNS propagation for the new domain can take anywhere from a few minutes to 48 hours.

Can I change an addon domain to a primary domain?

This usually requires hosting provider intervention, as primary domains are often locked in the account configuration.

Will my email addresses still work?

No. Email accounts are tied to the domain name. You will need to create new email accounts for the new domain.