Page tree
Skip to end of metadata
Go to start of metadata

This document is for a previous release of cPanel & WHM. To view our latest documentation, visit our Home page.

For cPanel & WHM 11.46

(Home >> Domains >> Addon Domains)

Overview

An addon domain allows a new domain name to link to a subdirectory of your account. The system stores the addon domain’s files in a subdirectory of your public_html (Document Root) directory. Addon domains allow you to control multiple domains from a single account. Your hosting provider can enable addon domains in WHM's Tweak Settings interface (Home >> Server Configuration >> Tweak Settings).

Create an addon domain

To create an addon domain, perform the following steps:

  1. Enter the domain for the new addon domain in the New Domain Name text box.

    Note

    When you enter the domain name, cPanel automatically populates the Subdomain or FTP Username text box. If you want to create multiple addon domains that have the same username and different extensions (such as example.com and example.net), manually enter a unique username into the Subdomain or FTP Username text box.

  2. Enter the directory that will contain the addon domain’s files in the Document Root text box.
  3. Enter the password for the addon domain into the Password text box.

    Notes:

    • Make sure you use a secure password.
    • You can use the Generate Password feature to generate a secure password.
  4. Confirm the password in the Confirm Password text box.
  5. Click Add Domain

    Note:

    When you create an addon domain in the cPanel interface, the system automatically creates a subdomain. If you alter or delete the subdomain after you create it, you may affect or delete the information that the addon domain's website displays.

  6. To add files to the addon domain’s home directory, click File Manager.

Note:

You can find web statistics for the addon domain under the subdomain's URL in the statistics application.

Modify Addon Domain

Modify the document root for an addon domain

To modify the document root for an addon domain, perform the following steps:

  1. Click the notepad icon which corresponds to the addon domain that you wish to manage.
  2. Enter the new file path that you wish to use as the document root in the available text box.
  3. Click Change.

Enable or disable addon domain redirection

To disable or enable redirection of an addon domain, perform the following steps:

  1. Click the Manage Redirection link which corresponds to the addon domain that you wish to manage.
  2. If you wish to redirect the domain, enter the link to which you wish to redirect the addon domain in the available text box.
  3. Click Save.
    • To disable the redirect, click Disable Redirection.

Remove an addon domain

To remove an existing addon domain, perform the following steps:

  1. Click the Remove link that corresponds to the addon domain that you want to remove.
  2. To confirm that you wish to remove the addon domain, click Yes.
  3. To keep the addon domain, click No.

Email accounts in addon domains

You can create email accounts for addon domains. To learn how to set up an email account for an addon domain, read our Email Accounts documentation.

When you remove the addon domain, is email accounts will no longer appear in the cPanel interface. However, the contents for this email account still exist in the home/username/mail directory.

  • If you add the domain back to the same account as the primary domain, an addon domain, or a parked domain, the email accounts will reappear in the cPanel interface.
  • If you move the domain to a different account, you must add the email accounts manually and move the contents of the email account manually. The email accounts must follow the same name and same domain format that they previously followed.
    • You can use the Email Accounts interface to add new accounts, or you can run the /scripts/addpop script to manually add new email accounts.
    • To move one email account under a domain, you can run the following command:

       mv /home/old_account/mail/domain_name/email_account /home/new_account/mail/domain_name/

      After you run this command, the system creates the /home/new_account/mail/domain_name/ directory.

    • To move all the email accounts under a domain, run the following command:

      mv /home/old_account/mail/domain_name /home/new_account/mail

       After you move the files, run the following command to change the ownership of the new account:

      chown -R new_account:new_account /home/new_account/mail/domain_name.

Note:

Verify ownership of the email account after you move it.

Search addon domains

To search the list of addon domains, perform the following steps:

  1. Enter the search criteria into the Search box.
  2. Click Go.

Results that match your search criteria will populate the list.

Addon vs. parked domains

CharacteristicAddon domainsParked domains
The main domain appears in the address bar.YesNo
The domain uses the following Apache directive:VirtualHostServerAlias
The domain uses separate logs.YesNo
The domain uses separate stats.YesNo
The system treats the domain as a subdomain (other than the URL).YesNo
This type of domain is ideal for multiple domains that share the same address.NoYes