Find answers to your questions

Documentation

How to Create and Use Subdomains

  • 31

Subdomains

Subdomains allow you to separate your website into several distinct sections. Subdomains will look like this: subdomain.yourdomain.com, where subdomain is the name of the subdomain, and yourdomain is your domain name.

Examples

Here are some common subdomains:

  • http://forum.yourdomain.com (used for the installation of a forum application on a subdomain)
  • https://secure.yourdomain.com (used for a secured access to a subdomain)
  • http://private.yourdomain.com (used for a private access to a section of your hosting account)


Why create a subdomain?

  1. Subdomains allow you to physically separate your website into multiple sections
  2. Each subdomain can have its own FTP access, which will be different from the main FTP access
  3. Secure transactions can be completed on a subdomain with an SSL certificate
  4. Each subdomain can have its own DNS entries, allowing advanced manipulations


How to create a subdomain

  1. Connect to your cPanel
  2. Under Domains, click on SubDomains
  3. Under Create a subdomain,enter the subdomain's name and select the main domain in the roll-down menu.
  4. The Document Root box will be automatically filled with the value public_html/subdomain, where subdomain is the name of the subdomain chosen in step 3. This represents the folder which will hold the subdomain's files. For example, say you upload a file test.html in the public_html/subdomain/ folder. This file will then be accessible on the internet at this address: http://subdomain.yourdomain.com/test.html.
    It is recommended to keep the suggested root document, unless you have a good reason to change it.
  5. Click on Create to create the subdomain.

Please notice that subdomains can take up to 24 hours before being fully propagated on the Internet.


How to manage subdomains

You can manage your subdomains from the same cPanel page, under SubDomains and Modify a Subdomain. You will find all the created subdomains and their management tools to their right.

Document Root contains a link which allows you to directly modify a subdomain's files with cPanel's File Manager.

In the Actions column, you will find two tools: Manage Redirection and Delete. The Manage Redirection option will allow you to redirect the subdomain to another address. For example, you could create a subdomain m which implements mobile access to your site. The address m.mydomain.com would then take you to an interface designed to be viewed on mobile devices. The Delete link allows you to delete the selected subdomain.


If you still have questions about subdomains, feel free to contact us by opening a support ticket or by using our live chat feature.

Related Articles

How to empty my DNS cache Overview Your DNS cache stores the locations (IP addresses) of web servers that contain web pages which you have recently viewed. If the location of the web server changes before the entry in your DNS cache updates, you can no longer access the site. If you encounter a large number of HTML 404 error codes, you... What is cPanel? cPanel is a control panel with which you can manage almost any element of your cPanel hosting account. The interface is very easy to use - cPanel works constantly to improve the platform by staying on the cutting edge of technology as well as constantly updating its various security measures, making it... How cPanel & WHM Improved Email Hosting cPanel and WHM have gone through some serious upgrades to their Email Hosting features throughout the versions. Just in the past 2 years, the cPanel team have made it easier than ever for web hosting providers, system administrators, and all other cPanel users to be able to host email accounts. ... CURL: could not resolve host: cpanel.net Error: curl: (6) Could not resolve host: securedownloads.cpanel.net; Unknown error Fix: Edit: nano -w /etc/resolv.conf Add the following lines: nameserver 8.8.8.8 nameserver 8.8.4.4 If you still have questions or concerns, feel free to contact us by opening a support ticket or with... How can I activate my paid license after a trial? You can do this by running this command in SSH: /usr/local/cpanel/cpkeyclt It should look something like this: [root@cpanel home]# /usr/local/cpanel/cpkeyclt Updating cPanel license...Done. Update succeeded. Building global cache for cpanel...Done [root@cpanel home]# If you still have...