Web HostingPublished on December 15, 20256 min read

How to add a domain on cPanel

A single web hosting plan can serve several sites and several names. This guide shows how to add a domain on cPanel or in the client area, whether it is an addon domain for a new site, an alias that shows the same site or a subdomain. It also covers nameservers, the SSL certificate and common errors.


The types of domains in cPanel

TypeRoleExample
Main domainthe account's domain, served from public_htmlmysite.com
Addon domainanother name with its own site and its own folderothersite.com
Aliasanother name that shows the same site as an existing domainmysite.net
Subdomainan address under an existing domain, with its own folderblog.mysite.com

Here is how these domains fit into the account's folders, with the folders cPanel suggests by default.

/home/user/
├── public_html/        mysite.com (main domain)
├── othersite.com/      othersite.com (addon domain)
└── blog.mysite.com/    blog.mysite.com (subdomain)

mysite.net              alias, same content as mysite.com

Point your domain to the hosting

A domain only works on the hosting if it uses our nameservers. They are always the same, whatever your server.

ns1.ouiheberg.com
ns2.ouiheberg.com
ns3.ouiheberg.com
ns4.ouiheberg.com
  • If the domain is registered with OuiHeberg, change its nameservers from its page in the client area. The guide How to edit the DNS records of your domain shows where.

  • If it is registered elsewhere, log in to your registrar, open the domain's nameservers (or DNS servers) and replace them with the four above.

The Domains tab of the hosting page also lists these four servers, with a button to copy each one. The change usually propagates within a few hours, sometimes up to 48 hours. You can add the domain to the hosting without waiting: the site and the SSL certificate will work once propagation is done.


Add a domain in the client area

  1. Log in to dash.ouiheberg.com. In the left menu, click My Services, then your hosting plan.

  2. Open the Domains tab.

  3. In the Addon domains card, click Add a domain and type the name.

The Main domain card reminds you that this domain is served from public_html. The counter on the Addon domains card shows how many your plan includes. Once the limit is reached, the card shows "Your plan limit has been reached." and a View the higher plan link. The number of sites depends on your plan, as shown on the website hosting page.

Domains tab with the main domain, the additional domains and the subdomains

An addon domain answers as soon as its nameservers point to us. For an alias, a custom folder or a redirect, use cPanel, as explained below.


Add an addon domain (new site)

  1. On the hosting page, click Advanced panel at the top right. cPanel opens straight away, with no login details to type.

  2. In the Domains section, click Domains, then Create A New Domain.

  3. Under "Select the type of domain to create", keep Registered Domain. Temporary Domain only creates a provisional address.

  4. In Domain, type the name, such as othersite.com.

  5. Untick Share document root, so the domain gets its own folder.

  6. Check the folder suggested in Document Root (File System Location). By default, cPanel creates a folder named after the domain, at the root of the account.

  7. Click Submit. Submit And Create Another saves and reopens the form for another domain.

The Share document root choice is permanent. Ticked, it makes the domain an alias of the main domain. Unticked, it gives the domain its own folder.

Then upload the site to its folder, with the File Manager or over FTP (see How to create an FTP account in cPanel). For WordPress, Softaculous Apps Installer installs the site straight on the new domain.


Create a domain alias (same site)

An alias shows the same site as an existing domain. It lets you keep several extensions of your name, such as mysite.com and mysite.net.

  1. In cPanel, open Domains, then Create A New Domain.

  2. Keep Registered Domain and type the alias name.

  3. Leave Share document root ticked.

  4. Click Submit.

The same site now answers under two names. For Google, one name per piece of content is better. So open Domains › Redirects and create a permanent (301) redirect from the alias to the main domain.


Create a subdomain

A subdomain serves a separate part of the site: blog.mysite.com, shop.mysite.com, support.mysite.com or a working copy such as dev.mysite.com.

In the client area, on the Domains tab, click Add in the Subdomains card. Its counter shows how many your plan allows. The subdomain is ready almost at once.

In cPanel, the steps are those of an addon domain.

  1. Open Domains, then Create A New Domain.

  2. In Domain, type the full subdomain, such as boutique.mysite.com. cPanel recognises the parent domain and greys out the Share document root box.

  3. Check the suggested folder, by default boutique.mysite.com at the root of the account.

  4. Click Submit.

Create a New Domain form for the boutique subdomain, with Share document root greyed out


Manage your domains

The cPanel Domains page lists every domain on the account. For each one it shows the Document Root, the Redirects To column and the Force HTTPS Redirect state. The Manage and Create Email buttons sit in the Actions column.

cPanel Domains page with the document root and the forced HTTPS redirect

  • Manage opens the domain's page. There you can change the site's folder (New Document Root, then Update) or remove the domain (Remove Domain).

  • Tick one or more domains, then click Enable Force HTTPS Redirect, at the top of the list, to send their visitors to https:// once the certificate is in place. The switch in the Force HTTPS Redirect column does the same for a single domain.

  • In the client area, the Delete button of a subdomain removes it from the hosting.

Removing a domain does not delete the files in its folder. Delete them yourself if they are no longer needed, after creating an archive in the Backups tab.


SSL certificate for your domains

Every domain and subdomain gets a free SSL certificate, renewed automatically, as soon as its nameservers point to the hosting. The SSL certificates tab of the client area counts the secured domains.

In cPanel, open SSL/TLS Certificates (Security section), Status tab. Each domain shows the state of its certificate there. A message such as "is unmanaged. Verify registration and authoritative nameserver configuration" means the domain does not point to our nameservers yet. Fix them, then wait for the next automatic certificate run. If a certificate stays in error while the nameservers are correct, open a ticket.

Status tab of SSL/TLS Certificates with the domains and the state of their certificate


Troubleshooting

The domain already exists on the account

The domain or subdomain already exists on the account, sometimes under another type. Look for it in the Domains list. Remove it before creating it again if it has the wrong type.

The domain does not answer or the certificate is not created

  • Check that the nameservers are ns1.ouiheberg.com to ns4.ouiheberg.com, with our DNS lookup tool.

  • Give propagation time, sometimes up to 48 hours.

  • Check that the domain has not expired with its registrar.

The site shows a 404 error or a blank page

CauseSolution
Empty folderUpload the site, with at least an index.html or index.php file.
Wrong folderCompare the Document Root with the folder that holds your files.
Home page file badly namedRename it index.html or index.php.

The browser shows "Not secure"

CauseSolution
Certificate not created yetCheck the nameservers and the Status tab of SSL/TLS Certificates.
Mixed contentLoad every image, script and stylesheet over https://.
No redirect to HTTPSTurn on Force HTTPS Redirect for the domain.

Addon domain checklist

  • The nameservers point to OuiHeberg.

  • Propagation is complete.

  • The domain appears in the Domains tab or in cPanel.

  • Its folder exists and holds an index.html or index.php file.

  • The SSL certificate is active.


Need help?

Open a ticket from Tickets › Open a ticket (dash.ouiheberg.com/tickets/new), or click the Contact support tile at the bottom of your hosting page. You can also ask your question on our Discord.

Was this article helpful?

447 views
Share this article
Hébergement web
Need web hosting?

cPanel hosting with email accounts and databases, managed from the OuiHeberg client area.

View plans →

Related Articles