Create subdomains in cPanel


What is a subdomain?

A subdomain is an extension of your main domain that works as an independent website. For example, if your domain is yourdomain.com, you can create subdomains like blog.yourdomain.com, shop.yourdomain.com or app.yourdomain.com.


What to use subdomains for?

  • Create separate sections of your site (blog, shop, forum)
  • Host independent applications
  • Test changes without affecting the main site
  • Organize content by categories or functions

Steps to create a subdomain

1. Access cPanel

  • Go to your cPanel panel
  • Log in with your credentials

2. Go to "Subdomains" section

On the cPanel main page, look for the "Domains" section and click on "Subdomains".

You can also search for it using the search box at the top of cPanel.


3. Create the subdomain

In the "Create a Subdomain" section:

  • Subdomain: Enter the subdomain name (only the part before the dot, for example: blog to create blog.yourdomain.com)
  • Domain: Select the main domain from the dropdown menu (if you have multiple domains)
  • Document root directory: The directory where subdomain files will be hosted. By default it will be public_html/blog (if subdomain is "blog")

Click "Create".


4. Verify creation

After creating the subdomain, you should see:

  • The subdomain listed in "Current Subdomains"
  • The directory created automatically
  • A DNS CNAME record created automatically (in most cases)

Upload files to subdomain

Once the subdomain is created, you can upload files:

  1. In cPanel, search for "File Manager"
  2. Navigate to the subdomain directory (for example: public_html/blog)
  3. Upload your files using the "Upload" button
  4. Or use FTP/SFTP to transfer files

Important: Make sure you have an index.html or index.php file in the directory for the subdomain to display content.


Configure subdomain for WordPress

If you want to install WordPress on the subdomain:

  1. Create the subdomain as explained above
  2. In cPanel, search for "Softaculous" or "WordPress"
  3. Select "Install"
  4. In "Choose domain", select the subdomain
  5. In "In directory", leave empty to install in subdomain root
  6. Complete the rest of the form and install WordPress

Manage existing subdomains

See all subdomains:

In the "Subdomains" section, you'll see a list of all created subdomains with:

  • Complete subdomain name
  • Directory where it's hosted
  • Management options

Modify directory:

  1. Find the subdomain in the list
  2. Click "Modify"
  3. Change the document root directory
  4. Save changes

Delete subdomain:

  1. Find the subdomain in the list
  2. Click "Remove"
  3. Confirm deletion

Note: Deleting the subdomain does not delete the directory files. If you want to delete the files too, do it manually from File Manager.


Configure DNS for subdomains

In most cases, cPanel automatically creates the necessary DNS record. However, if you need to configure it manually:

  1. In cPanel, search for "Zone Editor"
  2. Select your domain
  3. Verify that a CNAME record exists for the subdomain pointing to the main domain
  4. Or create an A record pointing the subdomain to the server IP

Example CNAME record:

  • Name: blog
  • Type: CNAME
  • Record: yourdomain.com

Example A record:

  • Name: blog
  • Type: A
  • Record: Server IP (e.g., 23.175.40.100)

Common subdomains and their uses

  • www: Usually points to main site (already configured by default)
  • blog: For a separate blog
  • shop / store: For an online store
  • mail: For webmail access
  • ftp: For FTP access (if configured)
  • cpanel: For cPanel access
  • test / dev / staging: For test environments
  • api: For an API
  • app: For a web application

Common problems

Subdomain doesn't load

  • Verify DNS record is configured correctly
  • Wait for DNS propagation (can take up to 48 hours)
  • Verify files are in the correct directory
  • Verify an index file exists in the directory

Error 404 or "Site not found"

  • Verify the subdomain directory is correct
  • Verify files are in the directory
  • Verify file and directory permissions (755 for directories, 644 for files)

Subdomain shows main site

  • Verify the subdomain directory is different from the main site
  • Verify configuration in cPanel

Advanced configuration

Subdomain with SSL

To use HTTPS on your subdomain:

  1. Configure an SSL certificate for the subdomain (see guide "Install Let's Encrypt SSL certificates in cPanel")
  2. Or use a wildcard certificate that covers all subdomains

Subdomain with separate database

If your subdomain needs its own database:

  1. Create a new MySQL database in cPanel
  2. Assign a user to that database
  3. Configure your application (WordPress, etc.) to use that database

Tips

  • Use descriptive names: Choose names that indicate what the subdomain is for
  • Organize by function: Use subdomains to separate different functions of your site
  • Make backups: Include subdomains in your regular backups
  • Monitor usage: Review resource usage of each subdomain
  • Document configuration: Keep a record of what each subdomain does

Need help?

If you're having trouble creating or managing subdomains in cPanel, open a ticket from the billing.baires.host panel or contact us for support.

You can also reach us through our social media:

Was this answer helpful? 0 Users Found This Useful (0 Votes)