DrivenHost

Knowledgebase / Domains & DNS

Set up a domain alias in cPanel

Add a second domain to your cPanel account as an alias so it serves your existing website, then issue an SSL certificate for it.

If you own more than one domain name for the same business, you can have the extra names show your existing website instead of building a second site. In cPanel this is called a domain alias. Someone who types either name lands on the same pages, and your files and email stay exactly where they are.

To follow this guide you need the second domain already registered, and you need to log in to cPanel.

Point the second domain at your hosting

An alias only works once the domain resolves to your server, so start at the registrar where that domain is registered.

  1. Sign in to the account that holds the second domain.
  2. Set its nameservers to the ones listed for your hosting account.
  3. Save the change. It usually takes effect within a few hours, though it can take up to 24.

If you would rather keep DNS management at the registrar, you can point the domain with an A record instead of changing nameservers. The guides in our knowledgebase cover both approaches.

Add the alias in cPanel

  1. In cPanel, open Domains in the Domains section.
  2. Click Create A Domain.
  3. Enter the second domain name, without www.
  4. Tick the option to share the document root with your existing domain. This is the step that makes it an alias: it tells cPanel to serve your current site rather than create a new empty folder.
  5. Click Submit.

The domain now appears in your Domains list showing the same document root as your main site. Some older cPanel versions have a separate Aliases interface rather than the combined Domains screen, but the result is the same.

If you want visitors on the second domain to be sent to your main domain instead of seeing the same pages under two names, set up a redirect rather than an alias. Search engines generally prefer one address per page, so a redirect is the better choice when the second domain is a spelling variant or an old name.

Issue an SSL certificate for the alias

A certificate covering your main domain does not cover the new name, so visitors would see a warning on the https version until you add it.

  1. Open SSL/TLS Status in the Security section.
  2. Find the new domain in the list.
  3. Select it, then click Run AutoSSL.
  4. Give it a few minutes, then load the https address in a browser and check the padlock.

AutoSSL has to reach the domain on your server to validate it, so run this after the DNS change has taken effect, not before.

If it didn't work

  • DNS has not finished updating. Check at the registrar that the nameservers saved correctly, then try again later in the day. Browsers and home routers also cache old answers for a while.
  • The shared document root option was missed. If cPanel created a new folder, the domain will show an empty page or a placeholder. Remove the domain from the Domains list and add it again with sharing turned on.
  • The domain is still live somewhere else. A domain can only be active in one cPanel account at a time. If it is attached to another account, including one on the same server, it has to be removed there first.

Still not behaving as you expect? Open a ticket at /support with the domain name and we will check the configuration from the server side.

More in Domains & DNS

Stuck partway through? Support is answered by the engineers who run the servers, around the clock.

← All guides

No sales team. No scripts.

Tell us what you're running.
We'll tell you what it needs.

Migrations are free, quotes are written, and the engineer who replies is on the team that will run your server.