How do I Create and Remove an Addon Domain?
Addon domains are secondary domains hosted on a cPanel account. Addon domains typically have their distinct website.
The cPanel will allow you to add the addon domain even if you do not own (register) the domain name or if your name servers (DNS) have not propagated. However, the domain will not work until the domain is both registered and connected to the server where your website content is set up. Your new domains may be registered for this purpose at https://www.hostgator.com/domains.
This article will discuss the following topics.
- How to create an Addon domain ⤵
- How to remove an Addon domain ⤵
- How to point an Addon domain to another directory or folder ⤵
- Related articles ⤵
How to create an Addon domain
With addon domains, you can host multiple domains with different website content, all under the same disk space and bandwidth of one cPanel.
After purchasing a domain, or if you already own a domain you would like to host as an addon, you need to connect it to your HostGator account. For more information on how to connect your domain to your server, please see the following article.
WHM users cannot create an addon domain in your cPanels unless you set Max Addon Domains to more than zero in your WHM packages. You must also have subdomains set to a number equal to (or greater than) the number of addon domains you wish to allow. Please visit the following article for more details.
To create an addon domain:
- Log in to cPanel.
- In the Domains section, click on Domains.
- On the next page, click Create A New Domain.
- Enter the new domain into the Domain field.
- Make sure NOT to select the "Share document root (/home/username/public_html) with “domain.tld." option.
- Enter a directory name for the domain. Please note that this is the folder where the site files/contents of the domain (your website) will be saved, also called the "document root."
- Once done, click the Submit button.
Your new domain is now successfully added!
How to remove an Addon domain
Removing the addon domain only removes the domain from the DNS and server configuration. It does not affect the deleted domain's files and databases. While you can no longer access the affected files through the deleted domain name, you can still see them in your File Manager.
To delete an addon domain:
- In the Domains section, look for the addon domain you want to delete, then click on Manage.
- Click on the Remove Domain button.
- Click Yes, Remove This Domain to confirm.
How to point an Addon domain to another directory or folder
Sometimes you already have content uploaded to a specific folder on your account, or you want the content to be in a different folder than the default. In that case, you would specify the correct folder in the Document Root field of your domain.
If the folder already exists, it may give you a warning. In this case, you entered something that already exists on purpose. You can safely ignore this warning since you intend to point the addon domain to that folder.
For instructions on updating the document root of your domain, please visit the following article:
Please note that there are some directories you cannot use for your addon domain(s) as a document root directory.
- The account’s home directory itself (/)
- Directories outside of the account’s home directory (./ and ../)
- .cpanel
- .trash
- etc
- ssl
- tmp
- logs
- .cphorde
- spamassassin
- .htpasswds
- var
- cgi-bin
- ssh
- perl5
Related articles
- Differences between Aliases, Addon Domains, and Subdomains - If you want to know the differences between the parked domains, addon domains, and subdomains, please visit this article.
- How to create a URL redirect - Need help in redirecting your domain? Here is an article to guide you in managing your domain's redirection.
- I created an Addon domain; why did it say a Subdomain is added? - Wondering why a subdomain was created when you created a new addon domain; here's why.
- What is an Addon domain? - Visit this article to know more about addon domains.