Was this article helpful?

Where your files go: the DirectAdmin folder structure

Files and FTP3 min read

For your site to show on the internet, its files must be in the right folder. DirectAdmin organizes your account with a standard structure: each domain has its own folder inside domains, and inside it the public folder public_html. This article shows you where everything goes, so you do not upload files to a place nobody will see.

The standard DirectAdmin structure

/home/username/
  domains/
    yourdomain.com/
      public_html/      your site files
        shop/           subdomain shop.yourdomain.com
      private_html/     site over https (normally linked to public_html)
    otherdomain.com/
      public_html/
      private_html/

In this path, username is your DirectAdmin username (the one in your welcome email) and yourdomain.com is your domain.

What each folder holds

  • /home/username/: your home folder. It is the first thing you see in the File Manager and when you connect by FTP with the main account. Anything you store here, outside public_html, is not visible from the web.
  • domains/: holds one folder for each domain in your account, including the additional domains you add in Domain Setup.
  • public_html/: each domain's public folder. What is here is what your visitors see. The home page must be named index.html or index.php and sit directly in this folder.
  • private_html/: the folder used for visits over https://. It is normally linked to public_html, so your site is the same with http:// and https:// and you only need to upload the files once.
  • Subdomains: each subdomain has its folder inside the domain's public_html. For example, the files for shop.yourdomain.com go in public_html/shop.

Practical examples

You want to publishFolder
yourdomain.com/home/username/domains/yourdomain.com/public_html
yourdomain.com/blog/home/username/domains/yourdomain.com/public_html/blog
shop.yourdomain.com/home/username/domains/yourdomain.com/public_html/shop
otherdomain.com/home/username/domains/otherdomain.com/public_html

Good practices

  • Do not delete private_html or change its link unless you know what you are doing: it is the folder that answers for https://.
  • Keep outside public_html anything that should not be public, such as backups or configuration files with passwords.
  • If you are coming from cPanel: this service uses DirectAdmin, and the public folder is no longer /home/username/public_html but inside domains/yourdomain.com/. Keep this change in mind when migrating.
  • Installers: Softaculous picks the right folder automatically when you select the domain or subdomain.

If something does not work

  • You see a default page instead of your site: your files are not in public_html or the index file is missing. Also check that a sample page with the same name was not left behind.
  • It works with http but not with https (or the other way around): check that private_html is still linked to public_html.
  • The subdomain shows the main site: confirm that its files are in public_html/subdomain.

If you have questions, open a ticket at https://linkeia.com/submitticket.php with Technical Support.

Was this article helpful?

Share

Related articles

Didn't find what you were looking for?

Our team will help you sort it out.