Creating a subdomain in cPanel is a simple and effective way to organize your website or create separate sections and microsites under your main domain. This guide will walk you through the process of creating a subdomain using cPanel step-by-step.

What is a Subdomain?

A subdomain is a prefix added before your main domain name, allowing you to create distinct sections within your website. For example, if your main domain is example.com, subdomains can be blog.example.com, shop.example.com, or support.example.com.


Steps to Create a Subdomain in cPanel

1. Log in to Your cPanel Account

Open your browser and navigate to your cPanel login page, typically at:

  • https://yourdomain.com:2083 or

  • https://yourdomain.com/cpanel

Enter your username and password to log in.

2. Locate the Subdomains Option

Once logged in, scroll down to the Domains section and click on the Subdomains icon.

3. Create a New Subdomain

On the Subdomains page:

  • In the Create a Subdomain section, enter your desired subdomain name (e.g., blog) in the Subdomain field.

  • Select your main domain from the dropdown menu.

  • The Document Root field will auto-populate with a directory path (e.g., /public_html/blog). You can leave it as is or change it to your preferred folder.

  • Click the Create button.

You will see a confirmation message indicating your subdomain was successfully created.

4. Upload Content to Your Subdomain

  • Return to the cPanel main dashboard.

  • Click File Manager in the Files section.

  • Navigate to the folder matching your subdomain’s document root (e.g., public_html/blog).

  • Upload your website files here.

5. Test Your Subdomain

Open a new browser tab and visit your subdomain URL (e.g., http://blog.example.com) to verify that it loads correctly.


Conclusion

Creating a subdomain with cPanel is quick and easy, letting you organize your website or host multiple websites under the same domain. Simply follow these steps to set up your subdomain and start uploading content to it.


Frequently Asked Questions

Can I create multiple subdomains?
Yes, you can create as many subdomains as you need by repeating the steps above.

Do subdomains affect my main website?
No. Subdomains function independently, so changes on a subdomain do not impact the main domain website.

Do I need to update DNS settings?
Usually, cPanel automatically manages DNS records. If you use an external DNS provider, you may need to add an A record pointing your subdomain to your server’s IP address.

Esta resposta lhe foi útil? 0 Usuários acharam útil (0 Votos)