Domains

Create a subdomain in cPanel (blog, shop, staging)

Create subdomains such as blog.example.com or staging.example.com in cPanel, choose the document root, get SSL, and point a subdomain to an external server.

BeginnercPanel hosting2 min read

A subdomain is a prefix in front of your domain, such as blog.example.com or staging.example.com. It can run a completely separate website in its own folder, which makes it ideal for a staging copy, a help centre or a shop. You create subdomains in the cPanel Domains tool.

Before you start

  • The parent domain already in your cPanel account (main or addon domain).
  • The prefix you want, using letters, numbers and hyphens only.

Create a subdomain hosted in cPanel

  1. Open cPanel → Domains → Domains and click Create A New Domain.
  2. Enter the full name, for example blog.example.com.
  3. Untick Share document root so the subdomain gets its own folder.
  4. Check the Document Root. cPanel suggests blog.example.com (i.e. /home/user/blog.example.com). Many people prefer public_html/blog; either works.
  5. Click Submit. cPanel adds the DNS record automatically if the domain uses MdmHost nameservers.

Upload files into the document root, or install an app there with Softaculous by choosing the subdomain in the domain drop-down.

Free SSL for the subdomain

AutoSSL covers new subdomains automatically, usually within a few hours. Check cPanel → Security → SSL/TLS Status; if it shows a warning, click Run AutoSSL. If it still fails, see fix AutoSSL not issuing certificates.

Point a subdomain to another server

Sometimes the subdomain should not live in cPanel at all, for example shop.example.com on a hosted shop platform, or app.example.com on a VPS. In that case do not create it in Domains; add a DNS record instead:

  1. Open cPanel → Domains → Zone Editor and click Manage next to the domain.
  2. Click Add Record:
    • A record: name app, value the server IP.
    • CNAME record: name shop, value the hostname the platform gives you, such as shops.example-platform.com.
  3. Save the record. See Zone Editor DNS records for details.

Warning: If you create the subdomain in Domains and also add an external record, the two conflict. Remove the cPanel subdomain first.

Wildcard subdomains

To catch every prefix, for example for a multisite network, create the domain *.example.com in Domains with a document root. Wildcard SSL is not covered by AutoSSL in all cases; ask support if you need it.

Troubleshooting

  • Subdomain shows the main site: its document root is shared with the main domain. Click Manage and change it.
  • DNS_PROBE_FINISHED_NXDOMAIN: the DNS record is missing or the domain does not use MdmHost nameservers. Add an A record at your DNS provider.
  • 403 Forbidden: there is no index file in the folder yet. See fix 403 errors.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.