Managing Domains and Subdomains in cPanel
7 mins read

Managing Domains and Subdomains in cPanel

Managing domains and subdomains in cPanel allows you to organize your website’s structure, direct traffic, and create different sections of your website under various domain names.

This process is essential for anyone managing domains and subdomains multiple sites or sections of a site from a single hosting account.

Managing Domains and Subdomains in cPanel

Managing domains and subdomains in cPanel

Here’s an overview of how to managing domains and subdomains efficiently in cPanel.

1. Primary Domain Management

The primary domain is the main domain name associated with your hosting account. This is automatically set during your account setup and serves as the foundation for other domain-related features like subdomains and add-on domains.

  • Management: The primary domain is linked to your hosting account and cannot be modified directly through cPanel. For changes, you’ll need to contact your hosting provider.
  • Purpose: The primary domain is where your main website typically resides, and it will house the root directory (public_html) for your website files.

2. Add-on Domains

Add-on Domains allow you to host multiple websites on the same hosting account. These domains are entirely independent, with their own content, website structure, and email accounts.

Steps to Add Add-on Domains:

  • Access Add-on Domains: Go to Domains > Add-on Domains in cPanel.
  • Create Add-on Domain: Enter the domain name you want to add. cPanel will create a unique directory within your hosting account for the new domain’s files.
  • Set Document Root: This is where you will store the website files for your add-on domain.
  • Manage Add-on Domains: Once the add-on domain is set up, you can manage it like a separate website, complete with its own content, email addresses, and databases.

Use Cases:

  • Hosting multiple websites for different businesses or projects from a single hosting account.
  • Maintaining a separate website under a different domain name, all managed under the same control panel.

3. Subdomains

Subdomains allow you to create additional sections of your website under your main domain. Subdomains are typically used to segment different areas of a website, such as a blog, store, or forum.

Steps to Create a Subdomain:

  • Access Subdomains: Go to Domains > Subdomains in cPanel.
  • Create a Subdomain: Enter the desired subdomain name (e.g., blog.yourdomain.com) and select the domain under which it will reside. Specify the document root where the subdomain’s files will be stored.
  • Manage Subdomains: Once created, you can upload files, install software, and manage the subdomain as an independent part of your site.

Use Cases:

  • Creating specific areas of your site, such as blog.yourdomain.com or store.yourdomain.com.
  • Testing new site features or development work on a separate section of your domain without affecting the main website.

4. Parked Domains (Aliases)

Parked Domains or Aliases are domain names that point to your primary domain or another domain hosted on your account. These domains display the same content as the main domain, and are often used to secure different versions of a domain name (e.g., yourdomain.com and yourdomain.net).

Steps to Park a Domain:

  • Access Aliases: Go to Domains > Aliases in cPanel.
  • Add a Parked Domain: Enter the domain name you wish to park. Make sure it is registered and its DNS is pointing to your hosting account.
  • Manage Aliases: Traffic to the parked domain will be automatically redirected to the specified main domain.

Use Cases:

  • Protecting your brand by owning different versions of your domain (e.g., .com.net.org).
  • Redirecting multiple domains to the same website without needing separate hosting accounts.

5. Redirects

Redirects allow you to forward traffic from one domain or URL to another. This can be useful if you’ve changed domain names, rebranded, or need to forward traffic to a specific page.

Steps to Set Up a Redirect:

  • Access Redirects: Go to Domains > Redirects in cPanel.
  • Create a Redirect: Choose the domain or subdomain to be redirected and specify the destination URL.
  • Types of Redirects: You can choose between a 301 redirect (permanent) or 302 redirect (temporary).

Use Cases:

  • Redirecting old domains or URLs to new locations.
  • Forwarding traffic from one domain to another after rebranding or restructuring a website.

6. DNS Zone Management

DNS Zone Editor in cPanel gives you control over the DNS settings for your domains. Here, you can manage records like ACNAMEMX, and TXT records, which direct your domain traffic to the appropriate servers and services.

Steps to Manage DNS Zones:

  • Access Zone Editor: Go to Domains > Zone Editor in cPanel.
  • Edit Records: You can add, modify, or delete DNS records. For example, you can point your domain to a new server IP by editing the A record, or configure email settings through MX records.
  • DNS Propagation: After making changes, allow 24-48 hours for DNS propagation.

Use Cases:

  • Pointing a domain to a different hosting provider or server.
  • Configuring email settings through third-party providers (e.g., G Suite or Microsoft 365).
  • Setting up subdomains to point to different servers or web applications.

7. SSL Management

Securing your domains with SSL certificates is critical for protecting data transmission between your website and visitors. cPanel provides tools to manage SSL certificates for all your domains and subdomains.

Steps to Manage SSL:

  • Access SSL/TLS: Go to Security > SSL/TLS in cPanel.
  • Install SSL Certificates: You can install SSL certificates from trusted providers or use AutoSSL to automatically install free certificates (like those from Let’s Encrypt) on your domains.

Use Cases:

  • Protecting user data by encrypting traffic between visitors and your website.
  • Enhancing SEO and user trust by ensuring your domains are secured with HTTPS.

Best Practices for Managing Domains and Subdomains

  • Organize Your Domains: Keep your domains and subdomains well-organized in cPanel to avoid confusion and ensure smooth management.
  • Use SSL for All Domains: Make sure every domain and subdomain is secured with an SSL certificate to protect data and maintain search engine rankings.
  • Plan Subdomain Usage: Create subdomains only when necessary to keep your website structure clean and efficient.
  • Monitor DNS Records: Regularly check your DNS records for accuracy, especially after making changes to hosting or email configurations.

Conclusion

cPanel makes managing domains and subdomains simple and efficient, allowing you to expand your online presence without needing multiple hosting accounts.

By mastering these domain management tools, you can host multiple sites, set up new sections of your website, redirect traffic, and ensure that all your domains are secure and optimized.