How to add a domain in cPanel
One cPanel account can host several websites, each on its own domain. This guide shows how to add a domain on the Domains screen, choose between an addon domain and an alias, point the domain’s DNS to the server and get it an SSL certificate, and what to do when cPanel refuses the domain.
Short answer
To add a domain in cPanel, open Domains » Domains and click Create a New Domain. Enter the domain, for example example.net, untick Share document root so it gets its own folder, check the suggested Document Root and click Submit. The site only appears once the domain’s nameservers or A record point to this server, and AutoSSL can then issue its certificate.
- Where
- cPanel » Domains » Domains » Create a New Domain
- You need
- A cPanel login, a registered domain and a free addon domain in your package
- Applies to
- cPanel & WHM 134 (LTS) to 138, Jupiter theme
- Package limits
- Max Addon Domains, Max Parked Domains (aliases), Max Subdomains
Before you add a domain
cPanel can only host a domain that is already registered. You cannot register or renew a domain in cPanel; that happens at the domain registrar, or through your host if it sells domains.
Your hosting package limits how many domains the account can hold: Max Addon Domains for separate websites, Max Parked Domains for aliases and Max Subdomains for subdomains. The Create a New Domain screen shows how much of that quota is already used.
Decide where the new domain’s DNS will live before you start. If its nameservers will point to your host, cPanel manages every record for you. If the DNS stays at Cloudflare or at the registrar, you add the records there yourself.
Addon domain, alias or subdomain
The cPanel Domains screen creates three kinds of domain. Which one you get depends on the name you type and on the Share document root checkbox.
| Type | What it is | How to create it |
|---|---|---|
| Addon domain | A separate website with its own folder, for example example.net in public_html/example.net | Enter the domain and untick Share document root |
| Alias (parked domain) | A second name for the main website, for example example.co.uk showing the same site as example.com | Enter the domain and tick Share document root |
| Subdomain | A name under a domain the account already has, for example blog.example.com | Enter the full name, such as blog.example.com |
Older cPanel versions had separate Addon Domains, Aliases and Subdomains screens. Current versions no longer have them: all three kinds are created from Domains » Domains.
NoteA domain that shares the main domain’s document root cannot be given its own folder later on its Manage page. To turn an alias into a separate website, remove it and add it again with Share document root unticked.
Add the domain
- Log in to cPanel.
- In the Domains section, click Domains.
- Click Create a New Domain.
- If the screen asks for a domain type, select Registered Domain. Temporary Domain is for building a site before the real domain is ready.
- In Domain, enter the domain without
www, for exampleexample.net. - Untick Share document root so the domain gets its own folder.
- Check Document Root. cPanel suggests a folder inside
public_html; keep it or type another, such aspublic_html/example.net. - Leave the Subdomain field as cPanel filled it in.
- Click Submit, or Submit and Create Another to add more domains.
The new domain then appears in the list on the Domains screen with its document root. Clicking the domain’s name opens the website in a new tab.
NotecPanel also creates a matching subdomain of the main domain for every addon domain. The Domains list hides it; click the gear icon and Show Associated Domains to see it.
Point the domain to the server
Adding a domain in cPanel creates its DNS zone on the server, but visitors only reach the new site once the domain’s DNS points there. There are two ways to do that.
- Nameservers: at the registrar, set the domain’s nameservers to the ones your host gives you. cPanel’s Zone Editor then controls every record of the domain, including mail.
- A record: if the DNS stays at Cloudflare or the registrar, add an A record for the domain and for
wwwthere, pointing to the server’s IP address.
cPanel shows the server’s IP address as Shared IP Address or Dedicated IP Address in the General Information panel on the cPanel home page.
cPanel’s documentation warns that DNS changes can take two days or more to reach every nameserver on the internet. Until a nameserver change has spread, some visitors still reach the old host or get an error.
NoteMail for the domain follows its MX record, not its A record. If you only point the A record to this server, mail keeps going to the server that the MX record names.
Put the website in its folder
An addon domain serves the files in its own document root, the folder shown in the Document Root column on the Domains screen. Click that path to open the folder in File Manager.
Upload the site’s files into the addon domain’s folder, or install an application such as WordPress and choose the new domain during the install. The domain shows the site only when its folder holds an index.php or index.html at the top level, not inside a subfolder.
Guide: upload a website to cPanel Guide: install WordPress in cPanel
Get an SSL certificate for the new domain
When you create a domain, cPanel secures it with an existing certificate that covers the name, or else with a self-signed certificate. If your host has enabled AutoSSL, cPanel also requests a free certificate for the new domain and installs it when it is issued.
AutoSSL can only validate a domain whose DNS points to this server. Check the result in Security » SSL/TLS Status: the Has AutoSSL Problems filter lists domains that failed, for example because they do not resolve to the server. On some servers the same list is the Status tab of Security » SSL/TLS Certificates.
Once the new domain has a valid certificate, set its Force HTTPS Redirect toggle to On on the Domains screen, so visitors who type http:// move to https://.
Guide: install an SSL certificate in cPanel Guide: redirect a domain in cPanel
Change the folder, rename or remove a domain
On the cPanel Domains screen, click Manage next to a domain to change its document root or remove it. In cPanel 138 the same page can also rename the domain.
- To move the site to another folder, enter the path in New Document Root and click Update. cPanel does not move the files, so move them yourself. The main domain’s folder, and that of an alias sharing it, cannot be changed here.
- To remove the domain, click Remove Domain, then Yes, remove this domain. cPanel removes the domain’s web server and DNS entries but keeps its folder and files. Take a full backup first.
- Mailboxes on a removed domain disappear from Email Accounts, but their mail stays on the server, and they reappear if you add the domain again.
- In cPanel 138, Rename Domain renames the main domain, an addon domain or an alias and updates its email accounts, DNS records and document root. The new name must not already exist on the server, and subdomains cannot be renamed.
NoteThe main domain cannot be removed. In cPanel 134 and 136, only the host can change it, in WHM » Account Functions » Modify an Account.
Common problems
- cPanel says the domain “already exists” or “is owned by another user”.
- The domain is already on this server as a main domain, addon domain or alias, on your account or on someone else’s. Remove it from that account first, or ask your host to find and remove it.
- cPanel says “This domain points to an IP address that does not use the DNS servers associated with this server”.
- The domain’s DNS points to another host, and the server does not accept domains that resolve elsewhere. Point the domain’s nameservers to this server and try again once the change has spread, or ask your host, who controls this check in WHM » Tweak Settings.
- The new domain still shows the old site, a parking page or an error.
- The domain’s DNS does not point to this server yet, or your computer has cached the old address. Check the nameservers or A record at the registrar or DNS host, then wait for the old record’s TTL to run out.
- The new domain shows the main website instead of its own.
- The domain was created with Share document root ticked, which makes it an alias of the main domain. Remove it on its Manage page and add it again with the box unticked.
- The browser says the connection is not private.
- The domain still has a self-signed certificate because AutoSSL could not validate it, usually because DNS did not point here yet. Once DNS is correct, check SSL/TLS Status; the server also runs AutoSSL every night.
- cPanel will not let me add another domain.
- The account has used every addon domain or alias its package allows, or the host has not enabled those features. The quota shows on the Create a New Domain screen; ask your host to raise Max Addon Domains or Max Parked Domains.
Doing it from CTAServer
CTAServer connects to each cPanel server’s WHM with an API token on port 2087 and shows every hosting account with its main domain and how many addon domains and subdomains it has, synced from the server. The domain itself is still added in cPanel.
- Creating or removing addon domains, subdomains and aliases on cPanel servers is not done from CTAServer; use cPanel’s Domains screen.
- Changing an account’s main domain is not done from CTAServer either.
- Once the domain is added, its DNS records can be edited on CTAServer’s DNS zones screen through WHM’s API (A, AAAA, CNAME, MX, TXT, NS, SRV and CAA), so each change also appears in cPanel’s Zone Editor.
- After you add a domain, you can run an AutoSSL check for that one account from CTAServer’s Manage AutoSSL screen.
- Because the domain counts are synced from the server, a domain added in cPanel is counted in CTAServer’s account list after the next sync.
cPanel management with CTAServer The hosting accounts screen The DNS zone editor screen
Frequently asked questions
What is an addon domain in cPanel?
An addon domain is a second, separate website on the same cPanel account, with its own domain and its own folder inside public_html. It shares the account’s disk space and other package limits with the main domain. You create it in Domains » Domains with Share document root unticked.
What is the difference between an addon domain, an alias and a subdomain?
An addon domain is a separate website with its own folder. An alias, formerly called a parked domain, is another name for the main website and shows the same content. A subdomain such as blog.example.com is a name under a domain you already have, usually with its own folder.
How do I change the primary domain in cPanel?
In cPanel 134 and 136, only your host can change it, in WHM » Account Functions » Modify an Account under Primary Domain. cPanel 138 adds Rename Domain to the domain’s Manage page on Domains » Domains, which can rename the main domain if your host allows it. Email accounts and DNS records follow the new name.
How many domains can I add to a cPanel account?
As many as your hosting package allows. The host sets Max Addon Domains, Max Parked Domains (aliases) and Max Subdomains in the package, and the Create a New Domain screen shows how much of that quota you have used.
Can I add a domain registered with another company to cPanel?
Yes. Point the domain to the server at its registrar, either by changing its nameservers to your host’s or by adding an A record with the server’s IP address, and add it in Domains » Domains. If cPanel refuses it because the DNS still points elsewhere, change the nameservers first.
How do I remove a domain from cPanel?
On Domains » Domains, click Manage next to the domain, then Remove Domain and Yes, remove this domain. cPanel removes the domain’s web server and DNS entries but keeps its folder and files on the server. The main domain cannot be removed.
Connect your first server today.
Free for 7 days, no card needed. Create your account, add your first server with an API token or an SSH key, and the panel starts filling in a few minutes later.
No setup fee · Cancel anytime · EU-hosted