Knowledge Base

How do I set up a subdomain in cPanel?

How do I set up a subdomain in cPanel?

A subdomain lets you create a separate section of your website using a name such as:

blog.yourdomain.co.nz

or:

shop.yourdomain.co.nz


Step 1: Log in to cPanel

Log in to cPanel through your WebhostingNZ client area.

If you are unsure how to access cPanel, please follow this guide first:

How to access cPanel from the Client Area


Step 2: Open Domains

In cPanel, open Domains.

Depending on the cPanel version, older layouts may show a separate Subdomains icon.


Step 3: Create the subdomain

Click Create A New Domain.

Enter the subdomain you want to create.

For example:

blog.yourdomain.co.nz

Make sure the document root is set to the folder you want the subdomain to use.

For example:

public_html/blog


Step 4: Save the change

Click Submit or Create.

cPanel will create the subdomain and the folder for the website files.


Step 5: Upload your website files

Upload the files for the subdomain into the folder shown as the document root.

For example, if the document root is:

public_html/blog

then upload the subdomain website files into that folder.


DNS note

If your domain uses WebhostingNZ nameservers, the DNS record for the subdomain is usually created automatically.

If your DNS is managed somewhere else, you may need to create the subdomain DNS record with your DNS provider.


Need help?

If the subdomain does not work after creating it, please contact support and include:

  • the main domain name
  • the subdomain you created
  • where the DNS is managed
Please rate this article to help us improve our Knowledge Base.

0 0