Document Root
Here you will learn what the start directory (Document Root) of your hosting looks like and where you can store your website data.
What is the Document Root?
The Document Root is the start directory of your domain. All files you want to display on your website must be uploaded to this directory.
Windows Webserver
On Windows hostings, you will find the start directory directly in the main folder:
Start directory: /
Absolute path: d:\www<username>
Example:
d:\www\www250
When you connect to the server via FTP, you will land directly in this directory and can upload your data there.
CloudLinux Webserver
On our CloudLinux hostings, it looks a bit different:
Start directory: /www
Absolute path: /data/www/<username>/www
Example:
/ data/www/www250/www
You can store all your web data in the folder /www
Displaying Document Root with PHP
You can also simply display your Document Root with a small PHP file.
Create a file with the following content:
<?php echo $_SERVER["DOCUMENT_ROOT"]; ?>
Save the file, e.g. as root.php, and upload it via FTP to the desired directory.
When you open the file in your browser, it will show you the absolute path.
Domain Mappings
When you change the path of your main domain in the System Configurator or set up a Domain Mapping, the start directory may also change.
Example Subdomain:
You create a subdomain shop.yourdomain.com and point it to the directory /shop. This directory then becomes your start directory.
Windows Hosting:
Start directory: /shop
Absolute path: d:\www<username>\shop
CloudLinux Hosting:
Start directory: /www/shop
Absolute path: /data/www/<username>/www/shop
For more information about setting up Domain Mappings, check out our article Set up Domain Mappings.
