# Managing domain aliases in cPanel

Domain aliases make your website available from another domain name. For example, you can make **[www.example.net](http://www.example.net)** and **[www.example.org](http://www.example.org)** show content from **[www.example.com](http://www.example.com)**

{% code title="Location Under cPanel" %}

```
cPanel > Home > Domains > Aliases
```

{% endcode %}

### Overview <a href="#aliases-overview" id="aliases-overview"></a>

Domain aliases are domains that you own, but which do not contain any content. Instead, they point to the contents of another domain or subdomain on your account. This is useful, for example, to hold a domain that you will later sell, or to redirect traffic to another domain.

Important:

Unless your hosting provider enables the *Allow Remote Domains* option in the [*Tweak Settings*](https://documentation.cpanel.net/display/68Docs/Tweak+Settings) interface (*WHM >> Home >> Server Configuration >> Tweak Settings*), you **must** perform the following actions **before** you attempt to create a domain alias:

* You **must** register the domain name with a valid registrar.
* You **must** point the domain to your account’s nameservers.

### Create a New Alias <a href="#aliases-createanewalias" id="aliases-createanewalias"></a>

To add a domain alias, enter the domain name in the text box and click *Add Domain*.

To open the alias domain’s home directory with the [*File Manager*](https://documentation.cpanel.net/display/68Docs/File+Manager) interface (*cPanel >> Home >> Files >> File Manager*), click the link that corresponds to that alias under the *Domain Root* column of the *Remove Aliases* table.

When you create an addon domain, parked domain, subdomain, or main domain, the system will attempt to automatically secure that domain with the best-available existing certificate. If no certificate exists, the system will generate a self-signed certificate to secure the new domain.

If [AutoSSL](https://documentation.cpanel.net/display/68Docs/Manage+AutoSSL) is enabled for the account that owns the new domain, the system will add a request for an AutoSSL certificate to secure the new domain and install it when available.

Note:

You can create email accounts for domain aliases. For more information, read the [Alias domain email accounts](https://documentation.cpanel.net/display/68Docs/Aliases#Aliases-EmailAccounts) section below.

### Enable or disable domain alias redirection <a href="#aliases-enableordisabledomainaliasredirection" id="aliases-enableordisabledomainaliasredirection"></a>

To enable or disable redirection of a domain alias, perform the following steps:

1. Click *Manage Redirection* for the domain alias that you wish to manage.
2. To redirect the domain, enter the link to which you wish to redirect the domain alias in the text box.
3. Click *Save*. To disable the redirection, click *Disable Redirection*.

### Remove Aliases <a href="#aliases-removealiases" id="aliases-removealiases"></a>

Notes:

* We **strongly** recommend that you create a full account backup before you perform this action.
* This action **only** removes the domain alias, its `vhost` entries, and its DNS entries. The system retains the alias’s directory contents.

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

1. Click *Remove* for the alias that you wish to remove.
2. Click *Yes* to confirm that you wish to remove the domain alias. To retain the domain alias, click *No*.

### Search aliases <a href="#aliases-searchaliases" id="aliases-searchaliases"></a>

To search through the list of domain aliases, enter the search criteria in the *Search* text box and click *Go*. Results that match your search criteria will populate the table.

### Domain alias email accounts <a href="#aliases-emailaccountsdomainaliasemailaccounts" id="aliases-emailaccountsdomainaliasemailaccounts"></a>

To add new email accounts, use cPanel’s [*Email Accounts*](https://documentation.cpanel.net/display/68Docs/Email+Accounts) interface (*cPanel >> Home >> Email >> Email Accounts*), or run the `/scripts/addpop` script from the command line.

* To move **one** email account under a domain, run the following command:

  | `mv` `/home/old_account/mail/domain_name/email_account` `/home/new_account/mail/domain_name/` |
  | --------------------------------------------------------------------------------------------- |

  When you run this command, the system creates the `/home/new_account/mail/domain_name/` directory.
* To move **all** of 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, change the new account’s ownership with the following command:

  | `chown` `-R new_account:new_account /home/new_account/mail/domain_name` |
  | ----------------------------------------------------------------------- |

  Note:

  Make certain that you verify ownership of the email account after you move it.

If you remove the domain alias, its email accounts will no longer appear in the [*Email Accounts*](https://documentation.cpanel.net/display/68Docs/Email+Accounts) interface (*cPanel >> Home >> Email >> Email Accounts*). However, the email accounts’ contents still exist in the mail folder of the user’s `home/username/mail/` directory.

* If you add the domain again, to the same account as the primary domain, an addon domain, or an alias, the email accounts reappear in the interface.
* If you change the account’s primary domain name to the un-aliased domain name, the email accounts reappear in the interface.
  * You or your hosting provider can perform this action in WHM’s [*Modify an Account*](https://documentation.cpanel.net/display/68Docs/Modify+an+Account) interface (*WHM >> Home >> Account Functions >> Modify an Account)*.
  * When you perform this action, the former primary domain name’s mailboxes will **not** appear in the [*Email Accounts*](https://documentation.cpanel.net/display/68Docs/Email+Accounts) interface (*cPanel >> Home >> Email >> Email Accounts*). However, the files will still exist.
* If you move the domain to a different account, you **must** add the email accounts manually **and** move the contents of the email accounts manually.

  Note:

  The email accounts **must** follow the same name and domain formats that they previously followed.

### Addon vs. alias domains <a href="#aliases-addonvs.aliasdomains" id="aliases-addonvs.aliasdomains"></a>

| Characteristic                                                                 | Addon domains | Alias domains |
| ------------------------------------------------------------------------------ | ------------- | ------------- |
| The main domain appears in the address bar.                                    | Yes           | No            |
| The domain uses the following Apache directive:                                | VirtualHost   | ServerAlias   |
| The domain uses separate logs.                                                 | Yes           | No            |
| The domain uses separate stats.                                                | Yes           | No            |
| The system treats the domain as a subdomain (other than the URL).              | Yes           | No            |
| This type of domain is ideal for multiple domains that share the same address. | No            | Yes           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.vimzaa.com/cpanel-hosting/cpanel-domains/managing-domain-aliases-in-cpanel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
