cPanel

How to Create and Manage a Subdomain in cPanel

Introduction

Subdomains are extensions of a domain. They function separately from the main domain, thus they can be used to host additional websites. The format of a subdomain is: subdomain.domain.com.

Let’s say we have a domain mywebsite.com and we want to create a forum and a blog for the main site. We could locate them on forum.mywebsite.com and blog.mywebsite.com. These subdomains can also be accessed via mywebsite.com/forum and mywebsite.com/blog. In this tutorial, you will learn how to create and manage a subdomain in cPanel.

What you’ll need

Before you begin this guide you’ll need the following:

  • A functional domain correctly pointed to your hosting provider.
  • Access to cPanel.

Step 1 — Navigating to cPanel-> Subdomains section.

Note: If you already have a subdomain, please skip to Step 3 — Uploading files to subdomain Document Root.

Click the Subdomains icon in the Domains section to enter the creation screen.

Step 2 — Creating a Subdomain

Fill in all the fields and press

  1. Subdomain field represents the name of a subdomain. In this section, only the subdomain extension has to be entered.
  2. Domain field lets you choose the domain under which the subdomain will be created.
  3. Document Root is the root directory of a subdomain. This folder is created in public_html by default.
  4. After clicking Create, this message will appears on your screen.

You should see this screen after that.

If any errors or issues are encountered during this step, the hosting provider should be contacted for assistance.

Step 3 — Uploading files to subdomain Document Root

All files/scripts should be uploaded to the Document Root directory specified in Step 2. The directory is automatically created in public_html and can be easily accessed using File Manager section of cPanel. If a subdomain is created using an Addon Domain, the subdomain’s Document Root will be created inside the root directory of the addon domain, for example: public_html/addon_domain_root/subdomain_root.

Subdomain directory in File Manager.

Step 4 – Deleting a subdomain

If a subdomain is no longer required, or the name was enterred incorrectly, it is always possible to remove it. A subdomain can be deleted by pressing the Remove button in cPanel->Subdomains section.

Remove button.

Deletion confirmatiom.

IMPORTANT! The root directory and files of the subdomain will not be removed. A manual deletion will have to be performed by using the File Manager or any FTP client.

If the goal is to create a subdomain with a different name while displaying the same content, the best way would be to delete the old subdomain and create a new one with the same root directory as the deleted subdomain.

Optional – Changing DNS

Since subdomains function separately from the main domain, they can also use different DNS configuration. For example a subdomain can be used to create a Minecraft or Teamspeak server. DNS settings can be updated via cPanel -> Advanced Zone Editor or Simple Zone Editor

Looking for a better way to host your website?

Transfer your website to the fastest web hosting platform with 24/7 dedicated support.

Subdomain directory in File Manager.

More information about these editors can be found in the official cPanel documentation

Conclusion

To sum up, subdomains are a fast, cheap and effective way to create additional websites, as there is no need to purchase additional domain names. They can also be used to set up specific areas for your main website, such as a forum, blog, shop etc.

  • Subdomains are separately functioning domain extensions.
  • Subdomain DNS configuration can be changed without affecting the main domain.

4 Comments

Click here to post a comment

Join thousands of subscribers worldwide

and get awesome deals & the newest tutorials to your email

Please wait...

Thank you for sign up!

More in cPanel
How to Add a Redirect for Your Website

Close