spider web with sunlight in background

Why would you ever use cPanel to create a subdomain for your website? Your site has been tested and running along as expected.

Maybe your business is providing mobile or cell phone unlock codes. Therefore, you’d like to create a subdomain of testing.

Specifically, you may be in need of an environment for testing WooCommerce with the StockUnlocks plugin for WordPress.

The format for a subdomain looks something like this: subdomain.yourdomain.com. You can be as creative as you like when naming your subdomain.  For example, you can create a subdomain like one of these:

  • forum.yourdomain.com
  • mobile.yourdomain.com
  • secure.yourdomain.com

Advantages of Creating a Subdomain

What are some of the advantages of creating a subdomain in cPanel? As the examples above illustrate, if you have a forum for your website, you can create a subdomain called ‘forum’ and the domain address would be ‘forum.yourdomain.com’.

Some prefer to use subdomains for the mobile versions of their website, blogs, forums, and stores.

It’s not that difficult to use cPanel to create a subdomain. Let’s go through the steps to set one up now.

Use cPanel to Create a Subdomain

Step 1: Log into your cPanel account and go to the section with the heading ‘DOMAINS’ 

accessing cpanel to create a subdomainStep 2: Click on ‘Subdomains’

Step 3: Type in the name of the subdomain in the ‘Subdomain’ field

create a subdomain window in cpanelStep 4: Select the domain to create the subdomain under

Type the name of the subdomain directory you would like in the ‘Document Root’ field. cPanel will automatically create a directory for the subdomain in the public_html directory.

Step 5: Click ‘Create’

Since this is a new subdomain, there is no caching or DNS propagation to worry about. Therefore, the world wide web will be able to access the subdomain immediately.

After You Create a Subdomain in cPanel

cPanel will create the subdomain directory for you, but the rest is up to you. The next step would be to follow the steps outlined in How to Create a MySQL Database in cPanel and How to Install WordPress in cPanel.

Although the focus is to help you build your own website to unlock mobile or cell phones, you can use these instructions to make any kind of WordPress website.

What is DNS Propagation?

Ok, you’ve used cPanel to create a subdomain. However, the IP address of your main domain can get changed for various reasons. Maybe you moved your website to a different hosting provider or you switched from a shared IP address to a dedicated IP address.

All of this can happen within the same hosting environment. Of course, changing the main domain’s IP address will always affect the subdomain as well.

The record representing your website domain resides on different servers around the world. Domain Name Servers (DNS) track and hold these records. IP address changes may take some time to be updated around the world.

It can take up to 24 hours for DNS changes to show up on the worldwide web. This period is called the propagation time or cache updating.dns domain propagation represented by a dandelion

Typing the address into the URL or simply pinging it might seem like the best way to confirm subdomain propagation. That might appear to work fine for you because the DNS you are accessing from your location already has the updated information.

However, the user on the other side of the world may see a blank page with an error due to the DNS on their end not yet being updated.

How to Test Domain Propagation

There are various free services that you can use to test multiple DNS around the world to see the status of your subdomain. WhatsMyDNS is one way to test.

If you want to take things into your own hands, there’s another way of verifying that your subdomain changes have propagated. However, it involves a terminal function and knowing the NameServer record(s) you want to check.

There are 2 ways to verify the propagation of the subdomain:

  • Using nslookup
  • Using dig

Both of these are commands that can be accessed from a terminal window on your computer.

If you know the name of the DNS you’d like to check, for example, ns.inmotionhosting.com, open a terminal window and follow the instructions below to see the results.

Using nslookup to verify subdomain propagation

Type the following in the terminal window:

nslookup - ns.inmotionhosting.com

When the prompt appears, type this:

example.yourdomaine.com

If the subdomain address resolves, you will see something like this:

Name:   yourdomain.com

Address: 192.0.34.20

Using dig to verify subdomain propagation

Type the following in the terminal window:

dig@ns.inmotionhosting.com example.yourdomaine.com

If the subdomain address resolves, you will see something like this:

;; ANSWER SECTION:

yourdomain.com.        172800  IN  A   192.0.34.20

In Conclusion

When you use cPanel to create a subdomain for your website, your main domain is totally separate from your subdomain. Therefore, you can have a completely different site or functionality on your subdomain without affecting your main website.

Most hosting plans allow an unlimited number of subdomains as well as domains. However, you need to confirm the details with your hosting provider as some may require an upgrade before you may create additional domains and subdomains.

Let us know how you’re using subdomains!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.