Soft2Hosting
cPanel Addon Domains and Subdomains: Document Root Setup & Management Guide
Managing multiple websites or distinct application sections on a single shared hosting plan requires understanding how cPanel maps addon domains and subdomains to document roots. In modern cPanel versions, both domain types are managed through a unified Domains interface, allowing website owners to assign custom filesystem directories to each domain without conflicting with their primary website files.
Understanding Domains, Addon Domains, and Subdomains
Before adding websites to your cPanel account, clarify the roles of each domain type:
- Primary Domain: The core domain name registered with your shared hosting account. Its files reside in the primary document root, typically
/public_html. - Addon Domain: A completely independent second domain name (e.g.,
secondbrand.com) hosted within the same cPanel account. Visitors see an entirely separate website with its own email accounts, SSL certificate, and database, completely unaware that it shares hosting resources with your primary domain. - Subdomain: An extension of an existing domain name (e.g.,
store.primarybrand.comorblog.primarybrand.com). Subdomains route to a designated folder on your account, making them ideal for distinct sections like customer portals, staging environments, or knowledge bases. - Document Root: The exact folder on the server where cPanel looks to serve files for that specific domain name.
Step-by-Step Setup in the cPanel Domains Interface
Modern cPanel versions consolidate addon domains, subdomains, and aliases into a unified Domains tool. Follow these steps to configure a new website cleanly:
1. Access the Domains Interface
Log in to your cPanel control panel and click on Domains under the Domains section.
2. Click "Create A New Domain"
Click the blue Create A New Domain button in the top right corner.
3. Enter Domain Details
Enter the full domain name you wish to add (e.g., mysecondsite.com or portal.mainsite.com).
4. Critical Step: Uncheck "Share Document Root"
By default, cPanel may display a checkbox labeled Share document root (public_html) with "yourprimarydomain.com".
- DO NOT CHECK THIS BOX if you want an independent website. Checking it turns your domain into an alias (showing the exact same content as your primary site).
- UNCHECK THE BOX to define a distinct directory path for your new site.
5. Define the Document Root Directory
Once unchecked, cPanel presents the Document Root field. By default, it suggests a directory path such as public_html/mysecondsite.com.
Best practice: You can keep it inside public_html/mysecondsite.com or place it adjacent in your home directory (e.g., mysecondsite.com). Placing it outside of public_html prevents the primary domain's .htaccess rules from accidentally cascading down into your secondary site.
6. Submit and Save
Click Submit. cPanel provisions the DNS zone, configures the web server virtual host directives, and generates the document root folder.
DNS and Nameserver Configuration
Adding an addon domain inside cPanel creates the server-side virtual host entries, but visitors will not reach your site until public DNS points to Soft2Hosting. At your domain registrar (such as GoDaddy or Namecheap), update nameservers to point to your Soft2Hosting account nameservers, or create an A record pointing the domain to your cPanel server IP address.
Once DNS propagates, Soft2Hosting's automated AutoSSL service detects the new domain and issues a free trusted SSL certificate within a few hours, securing the site with HTTPS.
Managing Files in cPanel File Manager
Once your domain is created:
- Open cPanel File Manager.
- Navigate to the document root directory you specified during creation.
- Upload your website files or launch the Softaculous auto-installer to deploy a fresh WordPress instance directly into the new document root.
- Configure independent FTP accounts if freelance designers require access to this specific folder without exposing your entire home directory.
Common Document Root Mistakes to Avoid
- Accidentally Sharing Document Roots: Forgetting to uncheck the "Share document root" option causes both domain names to display the exact same website content.
- Moving Files Without Updating cPanel: If you manually rename or relocate a folder in File Manager, you must update the document root setting in cPanel's Domains interface under Manage; otherwise, visitors will receive HTTP 404 or 403 errors.
- Nesting Multiple Sites Inside Subfolders: If you place addon domains inside
public_html/site2, ensure that.htaccessrewrite rules in the rootpublic_htmldo not inadvertently interfere with your addon site's URL structure.
Multi-Site Hosting Plans on Soft2Hosting
If you plan to manage multiple websites, select a shared hosting package that provides sufficient storage and domain capacity:
- Starter Pro (Rs 2,499/year): Supports 1 single website with 10 GB NVMe storage. Best for standalone business sites.
- Business Pro Hosting (Rs 4,999/year): Supports up to 10 websites on 50 GB NVMe storage with unmetered bandwidth, unlimited email accounts, and automated daily backups.
- Enterprise Pro Hosting (Rs 7,999/year): Supports unlimited websites on 100 GB NVMe storage, featuring LiteSpeed plus Redis caching, unmetered bandwidth, and priority customer assistance.
Explore multi-website shared hosting packages on Soft2Hosting Web Hosting.