How to Create a Subdomain in DirectAdmin
A subdomain creates a separate section of your website under its own URL. Examples:
shop.yourdomain.com— an online store separate from your main siteblog.yourdomain.com— a blog running independently from your main sitestaging.yourdomain.com— a private test version of your site before going livemail.yourdomain.com— used automatically by Hostking for webmail access
Each subdomain has its own folder on your hosting account and can run a completely separate website or application.
Step-by-Step
Step 1 — Log into DirectAdmin via my.hostking.host → your service → Login to DirectAdmin.
Step 2 — Under Domain Settings, click Subdomain Management.
Step 3 — In the Create Subdomain field, type the prefix you want to use. For example:
- Type
shopto createshop.yourdomain.com - Type
blogto createblog.yourdomain.com - Type
stagingto createstaging.yourdomain.com
Do not include the main domain — just the prefix.
Step 4 — Click Create.
DirectAdmin will create the subdomain and a matching folder in your hosting account. The folder will be at:
/domains/yourdomain.com/public_html/subdomain-name
For example, creating blog creates the folder /domains/yourdomain.com/public_html/blog.
Step 5 — Upload your website files to that folder, or install WordPress or another application into it using Softaculous.
Installing WordPress on a Subdomain
You can run a completely separate WordPress site on a subdomain. When installing via Softaculous in DirectAdmin, select the subdomain from the domain dropdown during setup. See: How to Install WordPress in DirectAdmin Using Softaculous
Does a Subdomain Need a Separate SSL Certificate?
Yes — each subdomain needs its own SSL certificate. After creating the subdomain, go to SSL Certificates in DirectAdmin and install a free Let's Encrypt certificate for it. See: How to Install a Free SSL Certificate in DirectAdmin
How Long Until It Works?
Subdomains created in DirectAdmin are usually active within a few minutes since the DNS record is added automatically. If your subdomain returns a 404 or "site cannot be reached" error after 30 minutes, check that files are present in the subdomain's folder.
Removing a Subdomain
If you need to remove a subdomain later, go back to Subdomain Management in DirectAdmin, find the subdomain in the list and click Delete. Note this removes the DNS record and the folder association but does not delete the files inside the folder — you will need to delete those manually via File Manager if required.
Need Help?
Our support team is available every day from 7am to 10pm via live chat at hostking.host or by opening a ticket at my.hostking.host.
