...

How to Create a Subdomain in cPanel

How to Create a Subdomain in cPanel

Creating a subdomain in cPanel is a common task for website developers and server administrators. A subdomain functions as a separate entity from the main domain and can be used for organizing your website’s content, such as creating a blog (blog.yourdomain.com) or a specific section (shop.yourdomain.com). Here’s how to create a subdomain in cPanel:

Steps to Create a Subdomain in cPanel

1. Log in to cPanel

  • Open your web browser and navigate to your cPanel login page, typically accessed via a URL like .
  • Enter your cPanel username and password to log in.

2. Access the Subdomains Function

  • Once logged in, look for the ‘Domains’ section in the cPanel dashboard.
  • Click on the ‘Subdomains’ icon. This will take you to the subdomain management area.

3. Create a New Subdomain

  • In the Subdomains section, you will find a form to create a new subdomain.
  • Subdomain: Enter the desired prefix for your subdomain (e.g., ‘blog’ for blog.yourdomain.com).
  • Domain: Choose the domain under which you want to create the subdomain from the dropdown menu.
  • Document Root: The field for the document root will often auto-fill based on the subdomain name, creating a new folder in your public_html directory (e.g., public_html/blog). You can change this if you have a specific directory in mind.

4. Create the Subdomain

  • After filling in the details, click the ‘Create’ or ‘Add’ button.
  • cPanel will then create the subdomain and set up the specified document root directory for it.

5. Verify the Subdomain

  • Once created, you should see the new subdomain listed in the ‘Modify a Subdomain’ section.
  • You can manage the subdomain from here, including setting up redirects or removing the subdomain if needed.

Additional Considerations

  • DNS Propagation: After creating a new subdomain, it may take some time for the DNS changes to propagate. This means the subdomain may not be immediately accessible from all locations.
  • SSL Certificates: If you have an SSL certificate for your main domain, check if it covers subdomains (wildcard SSL). If not, you may need to obtain a separate SSL certificate for the new subdomain.
  • Usage: Consider the purpose of your subdomain. Subdomains are often used for creating distinct sections of a site, testing environments, or different language versions.

Conclusion

Creating a subdomain in cPanel is a straightforward process that allows you to effectively organize and manage different sections of your website. It’s a useful feature for website development and administration, offering flexibility in how you structure and present your site’s content. Remember to consider aspects like SSL certificates and DNS propagation when setting up a new subdomain.

 

Previous Post
How to Create Addon Domains in cPanel
Next Post
How to change the style (theme) in your cPanel hosting account