Creating a subdomain in cPanel: opening a separate site such as blog.yourdomain.com
1. What is a subdomain, and when do you use one?
A subdomain is a new address you create by adding a name in front of your main domain: blog.ornekfirma.com, magaza.ornekfirma.com, test.ornekfirma.com and so on. You don't buy a new domain; it's a separate site in the same hosting account, running from its own folder.
Common uses:
- A blog or shop separate from the main site.
- A test site for trying a new design without breaking the live site.
- A short-lived page for a campaign or event.
If you want to add a completely different domain (for example gyroproje.com), see B18 — Adding an addon domain instead of this guide.
2. Open the Domains tool
- Log in to cPanel (client area → Services → your hosting service → Login to cPanel).
- On the home screen, open the Domains tool in the Domains group.
- Press Create A New Domain at the top right.
3. Create the subdomain
On the Create a New Domain page:
- Leave Registered Domain selected under Select the type of domain to create.
- Type the full subdomain in the Domain box:
magaza.ornekfirma.com. - For subdomains, the Share document root box comes unticked and greyed out, so the subdomain shows content separate from the main site.
- Document Root (File System Location) fills in automatically (for example
magaza.ornekfirma.com). This is the folder that will be created for the subdomain in your home directory. You can type a different name if you like. - Press Submit.
Don't leave Document Root empty and don't enter public_html, which is the main site's folder. Without a separate folder, the subdomain's files get mixed up with the main site's.
When it's done, the subdomain is added to the Domains list. The Document Root column shows the folder you upload its files to.
4. DNS, SSL and files
The DNS record
If your domain's nameservers point to the hosting (B13, Method 1), the subdomain's A record is added to Zone Editor automatically; there's nothing else to do.
If your DNS is managed elsewhere (B13, Method 2; for example Gyro DNS or your registrar), add an A record for the subdomain there:
- Name:
magaza(some panels wantmagaza.ornekfirma.com) - Value: the Shared IP Address in the cPanel General Information box
For the steps to add records in Gyro DNS, see L09 — Gyro DNS record management.
SSL
Once the subdomain points to the server, the free SSL certificate is installed automatically by AutoSSL. You can follow it on the SSL/TLS Certificates → Status tab (B16).
Uploading files
- Open File Manager; you'll see the subdomain's folder in your home directory.
- Open the folder and upload your site's files there, with the home page as
index.htmlorindex.php(B14). - If you're installing WordPress, choose the subdomain as the domain on the Softaculous install screen.
5. Check
- Open
http://magaza.ornekfirma.comin a browser. - If the page you uploaded appears, the subdomain works. If you haven't uploaded files yet, you may see an empty folder listing or a default page.
- After a few minutes, open it with
https://and check the padlock.
6. Changing or removing a subdomain
- In the Domains list, press Manage on the subdomain's row.
- To change its folder, enter the new folder in New Document Root and press Update.
- To remove it, use the Remove Domain button at the bottom of the page.
Remove Domain permanently removes the subdomain from your account and can't be undone. The files in its folder are not deleted; when you no longer need them, you can delete them separately in File Manager, or take a backup first (B20).
7. Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| "This domain already exists on this account" | The subdomain already exists | Search the list; choose a different name. |
| The subdomain doesn't open ("server not found") | No DNS record | If your DNS is elsewhere, add the A record; new records can take a while to propagate. |
| The main site opens instead | The document root is set to public_html |
Give it a separate folder with Manage → New Document Root. |
| An empty list or "Index of /" | No index.html / index.php in the folder |
Upload the files to the subdomain's folder. |
"Not secure" warning with https:// |
The certificate isn't installed yet | Check the Status tab described in B16. |
8. Frequently asked questions
How many subdomains can I create?
As many as your plan allows. You can see your usage in the Statistics box on the cPanel home screen.
Does a subdomain cost extra?
No. A subdomain belongs to your main domain; you don't buy a new domain.
Can I create email addresses on a subdomain?
Yes. Use Create Email on its row in the Domains list, or choose the subdomain as the domain in the Email Accounts tool.
Does www.magaza.ornekfirma.com work too?
If your nameservers point to the hosting, cPanel adds the www record as well. If your DNS is elsewhere, you need to add a separate record for www.magaza.
Does a subdomain affect the main site's search ranking?
Search engines mostly treat a subdomain as a separate site. If you don't want a test site to show up in search, turn off search engine indexing in your site's settings.
To try a new design without breaking your live site, you can open a subdomain such as test.ornekfirma.com, work there first, and move the files to the main site's folder when you're ready.
Next steps
- To add a different domain: B18 — Adding an addon domain.
- See hosting plans: Web Hosting.
Thanks for your feedback!
