Managing Domains and Subdomains in cPanel

This guide explains how to manage your domains and subdomains in cPanel, including adding new domains, creating subdomains, setting up redirects, and understanding how each domain type works within your hosting account.

  1. Accessing the Domains Section
  1. Log in to your cPanel dashboard.
  2. Scroll to the Domains section.
  3. Select Domains.

This page shows all domains currently associated with your hosting account and provides tools to add or manage them.

  1. Understanding Domain Types in cPanel

cPanel supports several domain types, each serving a different purpose:

Primary Domain

The main domain associated with your hosting account. It points to the public_html directory by default.

Addon Domains

Separate domains hosted under the same account.

  • Each addon domain has its own document root folder.
  • Ideal for hosting multiple websites under one hosting plan.

Subdomains

A prefix added to your main domain, such as blog.example.com.

  • Useful for separating sections of your site.
  • Each subdomain has its own folder inside your account.

Aliases (Parked Domains)

Domains that point to the same website as your primary domain.

  • Useful if you own multiple versions of your brand name.
  1. Adding a New Domain (Addon Domain)
  1. In the Domains interface, click Create a New Domain.
  2. Enter the domain name (for example, exampletwo.com).
  3. cPanel will automatically create a document root folder, but you can change it if needed.
  4. Leave the Share document root option disabled unless you want the domain to show the same site as your primary domain.
  5. Click Submit.

Your new domain will now appear in the list and can be managed like any other site.

  1. Creating a Subdomain
  1. In the Domains section, click Create a New Domain.
  2. Enter the subdomain in the format subdomain.yourdomain.com.
  3. cPanel will create a folder for the subdomain automatically.
  4. Click Submit.

Your subdomain will now function as its own mini-site with its own directory.

  1. Managing Domain Settings

For each domain listed, you can:

Modify the Document Root

Change the folder the domain points to.
Useful if you move your site or reorganise files.

Enable or Disable HTTPS Redirect

Forces the domain to load securely using SSL.
Recommended for all websites.

Remove a Domain

Deletes the domain from your hosting account.
This does not delete the domain registration itself.

  1. Setting Up Redirects

Redirects allow you to forward one URL to another.

  1. Go to the Domains section.
  2. Click Manage next to the domain.
  3. Scroll to the Redirects option.
  4. Choose the type of redirect:
    • Temporary (302)
    • Permanent (301)
  5. Enter the destination URL.
  6. Save your changes.

Examples:

  • Redirect example.com/blog to blog.example.com
  • Redirect an old domain to a new one
  1. Removing Domains or Subdomains

To remove a domain:

  1. Go to Domains.
  2. Click Manage next to the domain.
  3. Select Remove Domain.

To remove a subdomain:

  1. Go to Domains.
  2. Find the subdomain in the list.
  3. Click Manage, then Remove Domain.

Removing a domain does not delete its files. You can remove the folder manually if needed.

  1. Troubleshooting Common Domain Issues

Domain Not Loading

  • Check that the domain's DNS is pointing to your hosting nameservers.
  • DNS changes can take up to 24 hours to propagate.

Subdomain Shows a 404 Error

  • Ensure the subdomain folder contains an index file.
  • Check that the document root is correct.

HTTPS Not Working

  • SSL may not be installed yet.
  • Use the SSL/TLS Status tool to check certificate status.

Addon Domain Points to the Wrong Folder

  • Edit the document root in the domain's settings.
Esta resposta foi útil?

Artigos Relacionados

How to Create and Manage Email Accounts in cPanel

This guide explains how to create, manage, and access email accounts for your domain using...

Using phpMyAdmin to Manage MySQL Databases

This guide explains how to use phpMyAdmin in cPanel to view, edit, and manage your MySQL...

Understanding and Using cPanel File Manager

This guide explains how to use the cPanel File Manager to upload, edit, organise, and manage...

Setting Up and Managing FTP Accounts

This guide explains how to create, configure, and manage FTP accounts in cPanel. You will learn...

Getting Started with cPanel

This guide introduces the cPanel dashboard and walks you through the essential tools you’ll use...

Powered by WHMCompleteSolution