How to create a subdomain

Updated 2 days ago 17 views

Watch the 1-minute video (click the picture):

Watch the video: how to create a subdomain

The written guide with pictures follows below.

A subdomain is an extra address under your own domain name, for example shop.yourbusiness.co.za or blog.yourbusiness.co.za. Each subdomain can be its own separate website with its own files, while your main website stays exactly as it is. It takes about 5 minutes.

What you need before you start

  • Your hosting is active and your domain uses our nameservers (ns1.sawebmall.co.za and ns2.sawebmall.co.za). If you registered your domain with us, this is already done.
  • You are logged in to your control panel. If you are not sure how, read How to log in to your hosting control panel.

You do three things: add the address to DNS, create the subdomain website, and then switch on its free SSL padlock.

In this guide the example domain is propoara.co.za and the subdomain is shop. Replace these with your own.


Step 1: Add the address to DNS

DNS is the internet's address book. It must know that shop.yourdomain.co.za exists. Click DNS at the top of the control panel. You will see your domain in the list of DNS zones. Click it.

Your DNS zone

Stay on the Records tab and click the green A button.

The Records tab

Fill in:

  • Hostname: just the subdomain name, for example shop. Do not type your domain name.
  • IP-Address: 66.45.255.163 (the address of our server).
  • Leave TTL and Active as they are.

Click Save.

Adding the A record

Your new record appears in the list.

The new record in the list

Step 2: Create the subdomain website

Click Sites at the top. In the left menu, under Websites, click Subdomain (Vhost), then click the green Add new subdomain button.

Subdomain (Vhost) in the menu

Fill in:

  • Hostname: the same name as in step 1, for example shop.
  • Domain: choose your domain from the list.
  • Web folder: the folder where the subdomain's files will live. Using the same name, for example shop, keeps things tidy.
  • Auto-Subdomain: choose None.
  • PHP: choose PHP-FPM if your subdomain needs PHP (WordPress and most shops do).
  • Leave Active ticked.

Click Save.

Subdomain form

Your subdomain appears in the list.

The new subdomain in the list

Step 3: Switch on the free SSL padlock

Wait about 5 minutes after step 1 so that the address can be found, then click your subdomain in the list. Tick SSL and Let's Encrypt SSL, then click Save.

Ticking SSL and Let's Encrypt

The padlock is requested automatically. It can take up to an hour to appear. If you tick SSL too early, the request fails and the ticks switch themselves off again. If that happens, wait a little and repeat this step.

Step 4: Upload or install your subdomain website

The subdomain has its own folder, next to your main website's web folder, with the name you chose as Web folder (in our example shop). Upload your files there with FTP. Our guide How to create an FTP account and upload your website shows you how. You can also install WordPress or another application into that folder.

Then open https://shop.yourdomain.co.za in your browser to see it.

Good to know

  • Subdomain for website vs Subdomain (Vhost): the menu has both. Subdomain for website only shows your main website a second time under another name. Subdomain (Vhost), as used in this guide, gives you a separate website. If you want a different site on the subdomain, use Subdomain (Vhost).
  • Disk space and databases are shared with your main plan. If the subdomain needs a database, see How to create a database.
  • Each subdomain needs its own DNS record (step 1).
  • Deleting a subdomain removes its website settings. Download your files first if you still need them.

Something not working?

  • The page says the site cannot be found: the DNS record is missing or still spreading. Check step 1 and wait up to an hour. Our guide What is DNS propagation and how long does it take? explains why.
  • The browser says "Not secure": the padlock is not ready yet. Repeat step 3 after an hour.
  • Anything else: email info@comsys.co.za or open a ticket from your client area. We are available Monday to Friday 9:00 to 17:00 and Saturday 10:00 to 14:00.

Still need help?

If this article did not answer your question, our support team can help.

Contact support
Top