How to Create and Manage Subdomains in cPanel Print

  • cpanel, staging, domains, website hosting, dns, wordpress, subdomain, subdomain setup, document root
  • 0

How to Create and Manage Subdomains in cPanel

A subdomain is an extension of your primary domain name that allows you to create a separate website, application, or section of your existing website.

For example, if your domain is example.com, you could create:

  • blog.example.com — A separate blog.

  • shop.example.com — An online store.

  • support.example.com — A customer support website.

  • dev.example.com — A development or testing environment.

Lagrange Point Media (LPM) allows customers to manage supported subdomains through cPanel as part of their DIY Hosting services.

This guide explains how to create subdomains, manage their files, configure DNS, and troubleshoot common issues.

1. Understanding How Subdomains Work

A subdomain functions as a separate hostname under an existing domain.

Although it belongs to your primary domain, it can point to a different website directory, application, or server.

For example:

  • example.com might display your main business website.

  • store.example.com might display a separate WooCommerce installation.

  • members.example.com might display a membership portal.

Each subdomain can have its own website files and application installation, depending on how it is configured.

Important: Creating a subdomain does not automatically create a website. You must also configure the files or application that the subdomain will display.

2. Creating a Subdomain in cPanel

In current cPanel versions, subdomains are generally created through the Domains interface.

To create one:

  1. Sign in to the LPM Client Portal.

  2. Open cPanel from your active hosting service.

  3. Search for Domains.

  4. Click Domains to open the domain management interface.

  5. Click Create A New Domain.

  6. Enter the full subdomain you want to create, such as blog.example.com.

  7. If you want the subdomain to have its own website files, uncheck Share document root if that option is displayed.

  8. Review the proposed document root.

  9. Click Submit to create the subdomain.

Note: The available options and button labels may differ slightly depending on your cPanel interface.

3. Understanding the Document Root

The document root is the directory containing the files that a domain or subdomain serves to visitors.

For example, a subdomain such as blog.example.com might use a directory similar to:

/home/username/blog.example.com

The actual directory depends on your hosting configuration and the document root selected when creating the subdomain.

To check the document root:

  1. Open Domains in cPanel.

  2. Locate the subdomain.

  3. Review its listed Document Root.

You can then open File Manager and navigate to that directory to upload or manage the website's files.

Important: If a subdomain shares the document root of another domain, both hostnames may display the same website content. Use a separate document root when you want an independent website.

4. Installing WordPress on a Subdomain

Subdomains are commonly used to host separate WordPress installations.

After creating your subdomain:

  1. Open cPanel.

  2. Locate WP Toolkit.

  3. Start the WordPress installation process.

  4. Select the appropriate subdomain as the installation destination.

  5. Review the installation settings.

  6. Complete the installation.

Once WordPress is installed, you can manage it through WP Toolkit or its WordPress administration dashboard.

Tip: A separate WordPress installation generally uses its own database and files. Updating your main website does not automatically update a separate WordPress installation on a subdomain.

5. Understanding Subdomain DNS Records

For a subdomain to work, its DNS must direct visitors to the correct destination.

When you create a subdomain in cPanel, the server may automatically create the necessary DNS records in its local DNS zone.

However, if your domain uses external nameservers, such as those provided by a domain registrar or third-party DNS service, you may need to create the DNS record with that provider.

Common DNS record types include:

  • A Record: Points a hostname to an IPv4 address.

  • AAAA Record: Points a hostname to an IPv6 address.

  • CNAME Record: Points one hostname to another hostname.

For example, an A record for blog.example.com could direct visitors to the IP address of your hosting server.

Important: DNS changes are not always immediate. Cached records can cause some visitors to reach an older destination until the changes propagate.

6. SSL Certificates for Subdomains

Subdomains should use HTTPS to protect connections between visitors and your website.

LPM uses Let's Encrypt with cPanel AutoSSL to provide SSL certificates for eligible hosted domains and subdomains.

After creating your subdomain:

  1. Open cPanel.

  2. Search for SSL/TLS Status, if available.

  3. Locate the subdomain.

  4. Review its certificate status.

  5. If a certificate has not yet been issued, allow time for AutoSSL to process the domain.

AutoSSL requires successful domain validation. Incorrect DNS settings or other validation problems may prevent certificate issuance.

Note: SSL certificates are not necessarily issued immediately after creating a subdomain.

7. Redirecting a Subdomain

You can configure a subdomain to redirect visitors to another URL.

For example, help.example.com could redirect visitors to a support page on your main website.

To create a redirect:

  1. Open cPanel.

  2. Search for Redirects.

  3. Select the appropriate domain or subdomain.

  4. Enter the destination URL.

  5. Choose the appropriate redirect type.

  6. Save the redirect.

Common redirect types include:

  • 301 Permanent Redirect: Used when a URL has permanently moved.

  • 302 Temporary Redirect: Used when a redirect is intended to be temporary.

Use redirects carefully to avoid redirect loops or unintentionally sending visitors away from your website.

8. Troubleshooting Common Subdomain Problems

The Subdomain Does Not Load

Possible causes include:

  • Missing or incorrect DNS records.

  • DNS changes that have not fully propagated.

  • An incorrect document root.

  • Missing website files.

  • A website application configuration problem.

Start by checking the subdomain's DNS records and document root.

The Subdomain Displays the Main Website

This can happen when the subdomain shares the document root of the primary domain or when the website application redirects visitors to another hostname.

Check the document root in cPanel and review any application-level redirects.

The Subdomain Displays an SSL Warning

This may indicate that a valid SSL certificate has not yet been issued or that the certificate does not cover the subdomain.

Verify DNS configuration and check the certificate status.

WordPress Redirects to Another Domain

If you copied or migrated a WordPress installation, its configured Site Address and WordPress Address may still reference the original domain.

Review the WordPress URL settings and any configured redirects.

9. Removing a Subdomain

If you no longer need a subdomain, you can remove it through cPanel.

  1. Open Domains.

  2. Locate the subdomain.

  3. Select Manage.

  4. Review the available removal option.

  5. Confirm the removal.

Warning: Removing a subdomain's configuration does not necessarily delete all associated website files, databases, or DNS records. Review these separately before deleting anything.

If the subdomain contains an active website, create a complete backup before removing it.

10. Getting Help from LPM

If you're having trouble creating a subdomain, configuring its DNS, installing WordPress, or resolving SSL issues, contact LPM support.

Submit a support ticket through the LPM Client Portal.

Please include:

  • Your primary domain name.

  • The subdomain you're trying to configure.

  • A description of the problem.

  • Any error messages displayed.

  • Whether your DNS is managed through LPM or another provider, if known.

This information helps our support team identify the issue more efficiently.


Additional Resources:


Was this answer helpful?

« Back