There are many reasons you may need to modify a domain's document root, such as correcting a misspelling or moving it to a location outside of public_html. Here we cover the steps to change the document root for an addon domain in cPanel.
Changing the document root does not move the existing website files. It is recommended to copy the files for the addon domain to its new document root beforehand to avoid downtime. Files can be copied using File Manager, FTP, or SSH.
Related Articles
Copy Files Using File Manager
Getting Started with cPanel
Modify Document Root
- Log into cPanel
- Navigate to Domains, located in the Domains section
- Click on Manage domain you wish to modify
- Change the document root in the field to the intended new location for the files
NOTE: You will still need to manually move the site's contents into the new document root that is set for the domain. This change only lets the web server know where to look for the domain's site files. - Click Update