How to add a subdomain from cPanel in 2024
Adding a subdomain in cPanel is a straightforward process that lets you create a sub-domain of your main domain. This sub-domain can point to a specific directory on your server and host entirely different content. Here’s how to do it:
Steps for Subdomain:
- Log in to cPanel: Access your web hosting provider’s control panel using your cPanel credentials.
- Navigate to Domains Section: Locate the “Domains” section within cPanel. It might be directly available or under subsections like “Advanced” or “Email.” Find a link titled “Domains” or “Subdomains.”
- Create a New Subdomain: Click on a button like “Create a Sub-domain” or “Add New Sub-domain.”
- Enter Subdomain Details: Provide the following information in the designated fields:
- Subdomain: Enter the name you want for your subdomain (e.g., “blog.” or “shop.”). This will create a subdomain like “[invalid URL removed]”.
- Document Root (optional): By default, cPanel might pre-fill a directory based on the subdomain name. You have two options here:
- Use the default directory: Leave it as is if you want the subdomain’s files to reside in a directory with the same name within your main domain’s document root (usually “public_html/blog”).
- Specify a different directory: If you prefer a separate location, click on the “Document Root” selection tool and navigate to your desired directory within your home directory (e.g., “public_html/myblog”).
- Submit the Request: Click on “Add Subdomain” or a similar button to create the sub-domain. cPanel will process the information and set up your sub-domain.
After Creating the Subdomain:
- You won’t need to update nameservers for sub-domains as they inherit the settings from your main domain.
- Upload your website content for the sub-domain to the designated document root you chose.
- Your sub-domain should be accessible by typing “[invalid URL removed]” in your web browser (e.g., “[invalid URL removed]”).
Additional Tips:
- If you encounter any issues or have a different cPanel version, refer to your web hosting provider’s documentation or contact their support team for assistance.
- If you want to learn What is an Addon Domain and How to add an addon domain in cPanel, Then Click Here!
- If you want to learn How to Install an SSL Certificate from cPanel, Then Click Here!
By following these steps, you can easily add subdomains from your cPanel and expand your website’s functionality or create separate sections for different purposes.
Leave a Reply