Skip to main content
Document Root

What is the Root directory of your hosting?

P
Written by Philippe Udry
Updated over a week ago

The Web Root or Document Root directory is the starting directory of your domain. This is where your website data is stored.

Windows Web Server

On Windows Web Hosting, the root directory is:

/

The absolute path to your Document Root is:

d:\www\<username>

Example:

d:\www\www250

When you access the server via FTP, you will be directly in the directory where data can be published.

CloudLinux Web Server

On our CloudLinux Web Hosting, the root directory is:

/www

The absolute path to your Document Root directory is:

/data/www/<username>/www

Example:

/data/www/www250/www

If you are using a Web Hosting plan on our CloudLinux server environment, you can publish your web data in the /www directory.

Displaying the Document Root with PHP

Create a PHP file with the following content:

<?php echo $_SERVER["DOCUMENT_ROOT"]; ?>

Save the file with any name (e.g., root.php) and upload it via FTP to the directory you want to check.

Domain Mappings

If you adjust the path to your main domain through the System Configurator or add additional domain mappings that point to a subfolder, the root directory will change accordingly.

Example:

If a subdomain named shop.yourdomain.com is created and points to the /shop directory, this directory becomes the root directory, and data must be stored there.

Windows Hosting:

  • Root directory: /shop

  • Absolute path:

d:\www\<username>\shop

CloudLinux Hosting:

  • Root directory: /www/shop

  • Absolute path:

/data/www/<username>/www/shop

More information on setting up domain mappings can be found in this article.

Did this answer your question?