Valid for Linux Web Hosting.

When configuring scripts, installing web applications, or analysing errors, it is often necessary to know the exact location of your website files on the server. This complete path is referred to as the absolute path or document root. It describes the exact location of a directory in the server's file system.

This article shows you two simple methods to find out the absolute path for your webspace.

Method 1: Display absolute path in IONOS account

The quickest and easiest way to determine the absolute path is in your IONOS account:

  • Log in to your IONOS account.
  • Click on Menu > Hosting in the title bar.
  • In the Webspace tile, click on the Use Webspace button. The Webspace Explorer opens in the same tab and displays the content of the main directory (/).
  • If your website is located in a subdirectory, open the directory by clicking on the corresponding folder in the left-hand navigation.
  • To display the absolute path to the current directory, click on the path displayed behind Path: above the right-hand window area. If you are in the main directory of your webspace, you will only see the / character.
The path highlighted within the Webspace Explorer.
The path highlighted within the Webspace Explorer.
  • A pop-up window opens with the path details. The absolute path to your website is displayed in the "Absolute path" area.

    Example of web hosting contracts purchased before September 15, 2025:
    /kunden/homepages/26/d123456789/htdocs/

    Example of web hosting contracts purchased from September 15, 2025:
    /kunden/home/www/

 

The absolute path highlighted within the Path Details of the Webspace Explorer.
The absolute path highlighted within the Path Details of the Webspace Explorer.

Method 2: Read out the absolute path with a PHP script

Alternatively, you can determine the document root directly on your webspace using a small PHP script:

Step 1: Create PHP file
  • Open a simple text editor (e.g. Notepad on Windows, or TextEdit on macOS).
  • Copy the following code and paste it into the empty file:

    <?php
    echo "The absolute path is: ";
    echo $_SERVER['DOCUMENT_ROOT'];
    '>

  • Save the file under a unique name with the extension .php, for example path-info.php.

 

Step 2: Upload the file to your web space

Upload the PHP file you have just created to the root directory of your website. You can use Webspace Explorer or an FTP program such as FileZilla to do this. You can find instructions on how to upload files with FileZilla in the article Transferring files with FileZilla using SFTP.

 

Step 3: Open the script in the browser

Open your web browser and open the file by appending the file name to your domain. The page will now show you the absolute path of your webspace.

Example: http://your-domain.tld/path-info.php

Please Note

For security reasons, we recommend that you delete the PHP file from your webspace after use.