A SHARE OF $50,000 CASH! A SHARE OF $50,000 CASH!
We are aware of some customers receiving a fraudulent email claiming to be VentraIP Australia. Please do not open the link in this email, and mark it as spam immediately. If you have clicked the link in the email and entered your details, please update your VIPControl password immediately. Read More
View all Products Close Menu Menu
Changing the document root for a primary domain name
Updated Thursday January 28th 2021 / Category Web Hosting

On our cPanel hosting services, the primary domain name’s directory will always be public_html/ and this cannot be changed in the Domains section of cPanel (like how you can change this for add-on domains and sub-domains).

However, you can add the following code to your site’s .htaccess file to nominate a different folder for your site to load from.

PLEASE NOTE: This method is for advanced users and is not recommended if you are not familiar with modifying your website’s .htaccess file.

# START Change Document Root
RewriteEngine on
RewriteCond %{HTTP_HOST} ^$ [NC,OR]
RewriteCond %{HTTP_HOST} ^$
RewriteCond %{REQUEST_URI} !nominatedfoldername/
RewriteRule (.*) /nominatedfoldername/$1 [L]
# END Change Document Root

In this example, change to your website’s domain name, and nominatedfoldername to your website’s nominated document root path.

Can’t find the answers you're looking for? Check out these other methods of support!