The secondary domain name now displays the index file you uploaded to that folder. In the cPanel Home page click Domains and then select Addon Domains.
Then add the domain that you want to change the root directory as addon domain Its not recommended overriding Apache config.
Cpanel change root directory for domain. The steps below will explain how to change. In the account Dashboard click cPanel Admin. Enter a new document root starting at your home directory and then click Change.
2 Scroll down to the Files section. As you can host multiple domain names in cPanel addon domains and subdomains you need to have a unique folder for each domain. HostGator always recommends creating a full backup before making any major changes to your site.
How to generate a backup of my entire cPanel account. The Document Root text box defines the new subdomains directory relative to the cPanel accounts home directory. Please follow the below steps.
In the Modify Addon Domain or Modify a Subdomain section the root directory appears below Document Root. Enter the path to the addon domains new document root directory in the available text box. 4 Check the View Hidden Files checkbox.
Copy and paste the following text into the htaccess file. Login to WHM as the root user. Move my cPanel website with FTP and FileZilla.
CPanel change root directory in these 4 ways 1. Home Account Functions Modify an Account. Full path to the directory location you want to change the document root to.
In the New File Name text box type htaccess and then click Create New File. Procedure Access the server over SSH as the root user Edit the line beginning with documentroot in the following two files related to the particular cPanel user youre. Under Modify Addon Domain next to the domain you want to change click the pencil.
If you want to change the document root just change the main domain to anotherrandom domain. VPS and Dedicated Servers Steps to Change the Document Root with root access When a VPS or Dedicated server customer needs to make a document root change they can do so with Root Access. Domain to update document root for.
Watch this video to see how to update your document root in cPanel. After you create an addon domain or subdomain you can find the document root inside cPanel by clicking on the Addon Domains or Subdomains icon. At times you may already have another directory which you need to set as your document root.
3 Click the File Manager icon. Watch this video to see how to update your document root in cPanel. Change the primary domain to a placeholder domain such as.
In cPanel you cant change main domain directorydocument root. 5 You are working with your primary domain so select the WebRoot public_htmlwww option. Addon domain is a domain that points to a subfolder in the main domain.
Remove any subdomains of the primary domain. To modify the document root directory for an addon domain perform the following steps. Change Primary Domain Document Root in cPanelWHM 1 Log in to your cPanel account.
When the server admin creating an account with a domain system automatically creating its root folder in the system by following this article you can change your root folder as you want. Click the edit icon for the addon domain that you wish to manage in the Document Root column. CpanelWHM is the most popular Linux based operating system for controlling personal or dedicated hostings.
Select the user that you would like to modify then click the Modify button. In the cPanel Home page in the Domains section click either Subdomains or Addon Domains.