Root Directory

A root directory is the directory at the highest level of a hierarchy. It is also known as a root document. From this root all other directories branch off. For websites, the most needed files such as HTML pages are in the root directory of the server from where they will be requested for a page view via the browser. Root directories are also used for the organization of files on computers. Root directories are usually the hard drive c:. Root directories are not to be confused with a root server.


In order for files to be accessible by a computer or server, they must be applied in a logical structure in a directory. Through the root directory, files are stored in a tree structure. Further directories can then be derived from the root itself.

It is also called the root URL for webpages. But it is only comparable to a root directory in a figurative sense, as it usually remains invisible for Internet users and only concerns the file system in the backend or on the server.

Practical application[edit]

The operation of an Internet site requires webspace. This space is provided either on a dedicated server or by a web host. If a website is configured with a CMS, the necessary files are copied to the root directory of the server. The data necessary for loading a website can be retrieved from there. The same applies to the subpages of the domain that can be stored in the root directory and accessed through the browser. Usually, the file names are entered in HTML files and transferred directly to the URL.

Dynamically generated URLs may have to be rewritten into SEO-friendly URLs using the .htaccess file. It is advisable to structure the root directory in a well-organized fashion in order to avoid errors during server requests.

Web Links[edit]