Subdomains are an excellent way to create unique sections of your website, such as a blog or a store, without needing a separate domain. This guide explains how to set up a subdomain using cPanel.
What is a Subdomain?
A subdomain is a prefix added to your domain name to create a new web address. For example:
- Main Domain:
example.com
- Subdomain:
blog.example.com
orstore.example.com
Subdomains can be used for:
- Hosting a blog.
- Setting up a staging site.
- Creating localized versions of your site, such as
us.example.com
.
Steps to Create a Subdomain
-
Log in to cPanel
- Go to your hosting account’s cPanel login page.
- Enter your username and password.
-
Navigate to the Subdomains Section
- Locate and click on Subdomains under the Domains section.
-
Add a New Subdomain
- In the Subdomain field, enter the desired prefix (e.g.,
blog
orstore
). - Choose the domain you want to associate with this subdomain from the dropdown.
- The Document Root will automatically populate (e.g.,
public_html/blog
). - Modify the document root if needed.
- In the Subdomain field, enter the desired prefix (e.g.,
-
Click Create
- Press Create to finalize your subdomain setup.
- cPanel will confirm the subdomain has been created successfully.
-
Deploy Content to the Subdomain
- Upload your website files to the subdomain’s document root folder using File Manager or FTP.
Accessing Your Subdomain
Once created, your subdomain will be accessible at:
http://subdomain.example.com
You may need to wait for DNS propagation (up to 24–48 hours) if this is your first subdomain setup.
Common Issues and Troubleshooting
- Subdomain Not Working: Ensure DNS records for the subdomain are correctly set up.
- File Not Found Error: Verify your content is uploaded to the correct document root.
- SSL Not Configured: Install an SSL certificate for the subdomain to enable secure access (
https
).
Best Practices
- Use subdomains for distinct sections of your website to keep your main domain organized.
- Regularly back up subdomain content to prevent data loss.
- Consider SEO strategies for subdomains to ensure proper indexing.
Need Assistance?
Our support team is available to help if you encounter any issues. Open a ticket in your Client Area or email us at support@cybrohosting.com.