Subdomains

What is a Subdomain?

Adding a Subdomain

Creating a Wildcard Subdomain

Modifying or Removing a Subdomain

 



What is a Subdomain?


A subdomain is new address that can be created based on your top level domain. This subdomain can point to a subdirectory of your main site. 
Use subdomains to create memorable URLs for different content areas of your site. For example, you can create a subdomain for your blog that is accessible through http://blog.example.com instead of http://www.example.com/blog

 



Adding a Subdomain



1) Login to cPanel

2) Under the Domains section, click on the Subdomain icon

subdomain icon

3) On the next page, please consider and add the following values :

Subdomain - This is the value you want to appear before your domain in the new URL. If you wanted to create the subdomain blog.example.com, you would add the word blog here.


Domain - You may have more than one domain hosted on your account. If so, select the the domain you wish to create the subdomain with from the drop down menu.


Document Root - In most cases, you will probably want to point your subdomain to folder within a public_html/domain.com directory in your account. So for example, if you are adding a subdomain for "example.com" and you with to create a "blog" folder for this site/subdomain, be sure to enter public_html/example.com/blog as the document root.  Have question about this? Let us know.



4) Once you have considered and entered the detail above, click the blue Create button to add your desired subdomain.

create button

 

 

 

Creating a Wildcard Subdomain


A wildcard subdomain allows you to create one DNS record that will support unlimited non-existent host names. For example, after the creation of your wildcard, example1.domain.com, example2.domain.com, and example3.domain.com will all work and all direct to the document root you specified in the creation. In fact, any random word can be placed before the . (in place of the www) and the wildcard record will kick in and direct traffic to the folder you specify.  Any other additionally created subdomains will be excluded from this and will redirect to their own subfolders.



To create a wildcard subdomain follow these steps :


1) Login to cPanel


2) Under the Domains section, click on the Subdomain icon

subdomain icon



3) On the next page, please consider and add the following values :

Subdomain - To create a wildcard you must enter an asterisk (*) here. Like so :

wildcard example

 

Domain - You many have more than one domain hosted on your account. If so, select the the domain you wish to create the wildcard subdomain with from the drop down menu.

Document Root - You will probably want to point your wildcard subdomain to folder within a public_html/ directory in your account. Adjust this value to point to the directory you desire.  Have questions about this? Let us know.


4) Once you have considered and entered the detail above, click the blue Create button to add your desired subdomain.

create button

 

 

 

 

Modifying of Removing a Subdomain


Once you have created a subdomain, you can modify it or remove it following the instructions below :



1) Login to cPanel



2)
Under the Domains section, click on the Subdomain icon

subdomain icon


3) On the next page, look for the Modify a Subdomain section. Your existing subdomains will be listed there. You have several links/tools available to you in this section :


Click the Home icon home to access the root directory for this subdomain in the cPanel File Manager


Click the Pencil icon edit if you want to modify the document root for the subdomain in question.


Click the Remove icon remove if you wish to remove this subdomain from your account.


Click the Manage Redirection icon manage if you with to create or adjust a .htaccess redirect for the given subdomain.




If you have any questions about this, please let us know!

Was this answer helpful?

 Print this Article

Also Read

Zone Editors

cPanel offers both a Basic and Advanced Zone Editors. The Basic Zone Editor allows you to select...

Redirects

What is a Redirect?Adding a Redirect Removing a Redirect     What is a Redirect? Creating...

Addon Domains

What is an Addon domain? Do I want an Addon or an Alias? How to add an Addon domain? How to...

Domain Aliases

What is an Alias domain? Do I want an Alias or an Addon? How to I add Alias domain? How to I...