Skip to content
RIPE NCC member · Local Internet RegistryCall us on 020 3318 3449sales@hosting-telecom.uk

Domains and subdomains in cPanel

Addon domains, subdomains, aliases and redirects.

Contents

The domain management section lets you add addon domains, create subdomains, configure DNS and manage redirects.

Types of domain in cPanel

Primary domain (Main Domain)

  • The first domain given when the account was created
  • Linked to the public_html directory
  • Can’t be deleted (only changed by the hosting provider)
  • All other domains are attached to this account

Addon domains

  • Full, separate websites on the same account
  • Have their own root directory
  • Can have their own email accounts
  • Count towards the account’s quota

Subdomains

  • Subdomains of the primary domain or of addon domains
  • Examples: blog.example.com, shop.example.com
  • Have their own directory
  • Useful for separating different functions

Domain aliases (Aliases / Parked Domains)

  • Point to the same content as the primary domain
  • Used for different spellings of a domain
  • Have no directory of their own
  • Example: example.co.uk → an alias for example.com

Adding an addon domain

Requirements

  • The domain must be registered
  • The domain’s DNS must point to your server
  • The account limit must not have been exceeded

Adding an addon domain

  1. Go to DOMAINS → Domains
  2. Click Create A New Domain
  3. Fill in the form:

Settings

Domain
Enter the full domain name (for example, newsite.com)
Share document root
The option to use an existing directory
Off by default — a new folder is created
Document Root
The path to the domain’s root directory
Default: /home/username/public_html/newsite.com
Can be changed to any path within the account
Subdomain
A subdomain is created automatically (optional)
For example: newsite.primary-domain.com
  1. Click Submit
  2. The domain will be added and activated
Tip Allow 24–48 hours for DNS changes to propagate fully.

Checking DNS before you add the domain

Make sure the domain’s DNS is set up correctly:

  1. Go to DOMAINS → Track DNS
  2. Enter your domain
  3. Check the A record:
    • It should point to your server’s IP address
    • newsite.com → your.server.IP.address

If the DNS isn’t set up:

  1. Log in to your domain registrar’s control panel
  2. Change the name servers to those of your hosting provider, or
  3. Add an A record pointing to the server’s IP

Creating a subdomain

  1. Go to DOMAINS → Domains
  2. Click Create A New Domain
  3. Enter the full subdomain:

Examples:

  • blog.example.com
  • shop.example.com
  • test.example.com

Subdomain settings

Document Root
The directory for the subdomain’s files
Default: /home/username/public_html/subdomain
Example: /home/username/public_html/blog
  1. Click Submit

The subdomain will be created and available immediately (if the DNS is set up).

Using subdomains

Typical uses:

SubdomainPurposeExample use
blog.example.comBlogA company WordPress blog
shop.example.comShopAn online shop
forum.example.comForumA user community
test.example.comTestingA test version of the site
api.example.comAPIA REST API for applications
cdn.example.comCDNStatic content
m.example.comMobileA mobile version

Domain aliases

Aliases (also called Parked Domains) send visitors to the primary domain, showing the same content.

When to use aliases

  • Different top-level domains: example.com, example.co.uk, example.net
  • Common misspellings: exampl.com
  • Old brand names
  • Brand protection (registering similar domains)

Creating an alias

  1. Go to DOMAINS → Domains
  2. Find the primary domain
  3. Click Manage → Create a New Alias
  4. Enter the alias domain name
  5. Click Add Domain

Both domains now show the same content from the same directory.

Aliases vs redirects

FeatureAliasRedirect
URL in the browserStays as the aliasChanges to the target domain
SEOCan cause duplicate contentCorrect for SEO (301)
UseAlternative domainsMoving a site
Important For SEO, we recommend using 301 redirects instead of aliases to avoid duplicate content.

Redirects

Redirects automatically send visitors from one URL to another.

Types of redirect

301 (Permanent)
Permanent redirect
Used when: moving a site or changing domain
SEO: passes on link value
Cached by browsers
302 (Temporary)
Temporary redirect
Used when: making temporary changes or A/B testing
SEO: doesn’t pass on link value in full
Not cached as aggressively

Creating a redirect

  1. Go to DOMAINS → Redirects
  2. Click Create a Redirect
  3. Fill in the settings:

Redirect settings

Type
Choose Permanent (301) or Temporary (302)
Domain
The source domain (where to redirect from)
Directory (optional)
A specific path, or leave empty for the whole domain
Redirects to
The destination URL (where to redirect to)
Can be on the same domain or another one
www. redirection
Redirect with or without www. — redirect both versions
Only redirect with www. — only the www version
Only redirect without www. — only the version without www
Do Not Redirect www. — leave www alone
Wild Card Redirect
On: redirects all subpages
Example: old.com/page → new.com/page
Off: exact matches only
  1. Click Create

Redirect examples

A whole domain to a new one

HTTP to HTTPS

Tip For an HTTPS redirect it is better to use .htaccess (see the SSL section).

A specific page

Without www to with www

  • Type: Permanent (301)
  • Domain: example.com
  • Redirects to: https://www.example.com
  • www. redirection: Only redirect without www.

Managing redirects

The Current Redirects list shows:

  • Type (301/302)
  • Source
  • Destination
  • Actions (Edit, Delete)

Use the corresponding buttons to change or delete a redirect.

Advanced redirects through .htaccess

For complex redirect rules, edit .htaccess:

# Redirect the whole site
Redirect 301 / https://new-site.com/

# Redirect a specific page
Redirect 301 /old-page.html https://example.com/new-page.html

# Redirect from www to non-www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]

# Redirect from non-www to www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]

# Redirect an old URL pattern
RewriteEngine On
RewriteRule ^product/(.*)$ /shop/$1 [R=301,L]

# Redirect with parameters
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^product\.php$ /item/%1? [R=301,L]

Managing DNS (Zone Editor)

Zone Editor lets you manage the DNS records of your domains.

Accessing Zone Editor

  1. Go to DOMAINS → Zone Editor
  2. Select the domain you want to edit
  3. Click Manage

Types of DNS record

A Record (Address Record)

Links a domain to an IPv4 address.

Example:

  • Name: example.com
  • Record: A
  • Address: 192.0.2.1
  • TTL: 14400

Use:

  • Primary domain → server IP
  • Subdomains → server IP

To create one:

  1. Click +A Record
  2. Enter the name (@ for the domain root, or the name of a subdomain)
  3. Enter the IP address
  4. Set the TTL (caching time)
  5. Click Add an A Record

AAAA Record (IPv6 Address)

Like an A record, but for IPv6.

Example:

  • Name: example.com
  • Record: AAAA
  • Address: 2001:0db8:85a3::8a2e:0370:7334

CNAME Record (Canonical Name)

Creates an alias for another domain name.

Examples:

  • www.example.com → example.com
  • blog.example.com → blogger.com
  • mail.example.com → mailserver.hosting.com

To create one:

  1. Click +CNAME Record
  2. Name: the name of the subdomain (for example, www)
  3. Record: the domain it points to (for example, example.com)
  4. Click Add a CNAME Record
Important A CNAME can’t be set for the domain root (@). Use an A record instead.

MX Record (Mail Exchanger)

Specifies the mail servers for a domain.

Example:

  • Name: example.com
  • Priority: 0
  • Destination: mail.example.com

Priority:

  • A lower number means a higher priority
  • Usually 0, 10, 20 for different servers

To create one:

  1. Click +MX Record
  2. Enter the priority (usually 0 for the main server)
  3. Enter the mail server’s address
  4. Click Add an MX Record

TXT Record

Text information for a range of purposes.

Use:

  • SPF records (spam protection)
  • DKIM signatures (email authentication)
  • DMARC policies
  • Domain verification (Google, Microsoft and others)
  • Site verification

Examples:

SPF:

v=spf1 +a +mx +ip4:192.0.2.1 ~all

DKIM:

v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNA...

DMARC:

v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com

Google verification:

google-site-verification=AbCd12345XyZ...

To create one:

  1. Click +TXT Record
  2. Name: the name of the record (or @ for the root)
  3. Record: the text of the record
  4. Click Add a TXT Record

SRV Record (Service Record)

Defines the location of services.

Use:

  • VoIP (SIP)
  • Instant messaging (XMPP)
  • Game servers
  • Other specialised services

SIP example:

  • Name: _sip._tcp.example.com
  • Priority: 10
  • Weight: 60
  • Port: 5060
  • Target: sipserver.example.com

CAA Record (Certificate Authority Authorization)

Specifies which certificate authorities may issue SSL certificates for a domain.

Example:

  • Name: example.com
  • Flags: 0
  • Tag: issue
  • Value: letsencrypt.org

To create one:

example.com CAA 0 issue "letsencrypt.org"
example.com CAA 0 issuewild "letsencrypt.org"
example.com CAA 0 iodef "mailto:admin@example.com"

Editing DNS records

  1. Find the record in the list
  2. Click Edit
  3. Change the values
  4. Click Edit Record

Deleting DNS records

  1. Find the record
  2. Click Delete
  3. Confirm the deletion
Warning Incorrect DNS changes can make your website or email unavailable!

Resetting the DNS zone

To restore the default settings:

  1. Zone Editor → Manage
  2. Click Reset Zone
  3. Confirm the action

This will restore:

  • A records for the domain and www
  • MX records for email
  • The main service records

DNS propagation time

After you change DNS records:

  • TTL: caching time (usually 4 hours = 14400 seconds)
  • Full propagation: 24–48 hours
  • Checking: use DNS lookup tools

Checking tools:

# Check from the command line
nslookup example.com
dig example.com
host example.com

# Check a specific record type
dig example.com MX
dig example.com TXT

Dynamic DNS

Dynamic DNS updates the IP address in DNS when it changes (for dynamic IPs).

Usage

  1. Go to DOMAINS → Dynamic DNS
  2. Click Create
  3. Choose a domain or subdomain
  4. Click Create
  5. Copy the update URL you are given
  6. Set up your router, or use a DDNS client, to request this URL periodically
Tip Useful for home servers or devices with a dynamic IP.

Checking your domain configuration

Domains Dashboard

The main Domains page shows:

  • A list of all domains and subdomains
  • The Document Root of each
  • Management options (Manage, Delete)
  • SSL status

Checking availability

After you add a domain:

  1. Wait for DNS to propagate (1–24 hours)
  2. Open the domain in a browser
  3. Check that:
    • The site opens
    • The right content is shown
    • SSL works (if it is set up)

Troubleshooting

The domain doesn’t open:

  1. Check the DNS with Track DNS
  2. Make sure the A record points to the right IP
  3. Clear the DNS cache:
# Windows
ipconfig /flushdns

# macOS
sudo dscacheutil -flushcache

# Linux
sudo systemd-resolve --flush-caches

Someone else’s site is shown:

  • Check the Document Root in the domain’s settings
  • Make sure the files have been uploaded to the right directory

SSL doesn’t work:

  • Run AutoSSL for the domain
  • Check SSL/TLS Status

Limits and quotas

Check your limits in the right-hand panel of cPanel:

ItemTypical limitNote
Addon Domains0–100Depends on your hosting plan
SubdomainsUnlimited/100Usually unrestricted
Parked Domains0–100Depends on your plan
Disk SpaceAffects all domainsThe account’s overall quota
BandwidthAffects all domainsTotal traffic

Moving domains

Moving a domain to your account

  1. Create an Addon Domain
  2. Upload the files to the domain’s Document Root
  3. Import the database (if there is one)
  4. Update the configuration (wp-config.php and so on)
  5. Change the DNS to the new name servers or an A record

Moving between accounts

To move a domain between cPanel accounts:

  1. Create a full backup of the domain
  2. Add the domain in the new account
  3. Restore the files and database
  4. Update the DNS

Best practice

  1. Plan the structure
    • Use subdomains for logical separation
    • Use addon domains for separate projects
    • Document the purpose of each domain
  2. DNS management
    • Keep a record of DNS changes
    • Set sensible TTLs (4–24 hours)
    • Use CAA records to protect SSL
  3. Redirects
    • Use 301 for permanent changes
    • Handle www and non-www consistently
    • Always redirect to HTTPS
  4. Security
    • Password-protect test subdomains
    • Use SSL for all domains
    • Check your DNS records regularly
  5. SEO
    • Avoid duplicate content (aliases)
    • Use 301 redirects properly
    • Set up canonical URLs

Solving problems

Domain already exists

The domain has already been added on the server (possibly in another account).

Solution:

DNS isn’t updating

Check:

  1. Your internet provider’s DNS cache
  2. Try a different DNS server (8.8.8.8, 1.1.1.1)
  3. Check with online tools
  4. Wait 24–48 hours

Addon Domain isn’t working

Common causes:

  1. The DNS doesn’t point to the server
  2. The Document Root is wrong
  3. The domain limit has been exceeded
  4. A problem with file permissions

Subdomains don’t open

Solutions:

  1. Check whether an A record has been created for the subdomain
  2. Make sure the files are in the right directory
  3. Clear your browser cache
  4. Check .htaccess for errors

Email doesn’t work after adding a domain

Check:

  1. The MX records are set up correctly
  2. Email accounts have been created for the domain
  3. Email Authentication (SPF, DKIM) is set up

See also

  • SSL for addon domains
  • Advanced DNS management
  • Setting up email for domains
  • Moving a site to a new domain
  • SEO optimisation of domains

Didn’t find the answer? Ask our support team — we’ll help.

Choose which cookies we may use. You can change your mind at any time with the “Cookie settings” link at the bottom of every page.

Necessary

Always active

They keep the site secure and remember your cookie choice. They don’t identify you.

Google Analytics counts visits and shows which pages people find useful, so we can improve the site. Which cookies