Can I change the document root of primary domain or parked domain/Alias from cPanel?

cPanel will let you change the document root for any existing domain except if it points at /public_html (because it considers this an 'Alias' or secondary domain, and assumes it does not have its own files).

It is possible to change the document root for addon domains and subdomains of an account, but cPanel does not currently have a feature to change the document root of a parked domain/Alias.  Alternatively, you can create an addon domain instead of a parked domain and point it to the desired directory

If you have already added a parked domain (example: test.com ) and need to change the document root, then please follow the below steps:

  • Go to the 'Domains' icon in cPanel
  • Remove the 'parked domain/Alias(example : test.com)' domain
  • Back on the 'Domains' area in cPanel, click 'Create a New Domain'
  • Enter the domain name which was previously added as parked domain/Alias(example: test.com)
  • Un-check the 'Share document root' checkbox, and enter '/new-document-root' into the text-box that appear
  • The final, 'Subdomain' option can be left as-is.

To change the document root for an Addon Domain or Subdomain, you can proceed with the following steps.

  • Log in to the cPanel account the addon or sub-domain is located.
  • Access the "Home / Domains / Domains" interface in cPanel
  • Locate the domain to change the document root and select "Manage."
  • Change the document root under "New Document Root."
  • Click "Update"

The current cPanel version is 108, the knowledgebase is added on 25/04/2023

  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

What Is My Site's IP Address?

To find your site's IP address, please login to our primary client area...

Point NS at Lightning Base for Transferred Domains

To point the nameservers here, please login to https://secure.lightningbase.com and then click:...

How to change name-servers of the domain for which I have a registration service with LightningBase?

To change Name-servers of a domain, follow the steps below: 1. Log into the client area...

How do I modify my hosts file on my PC?

Before proceeding to edit the hosts file it is recommended to backup and make a copy of the file...

How to test a site before making it open to public?

Testing an imported or migrated site will help you avoid a lot of headaches and helps you to make...