Overview
This article explains the various directories you may see on your web server and how to confirm you are in the correct location when managing your website.
Terminology
You will see the terms /home directory, user's home directory, and website directory used very often when reading articles on where to upload and manage your website files. These terms can be confusing since they all point to a different location on the server.
User
A User (or username) is the ID name on a web server that a specific domain is assigned to. This is the user used to log into your server with an SFTP or SSH client to manage your website. Multiple websites can be created under a single user. View the following articles for further information about users at DreamHost.
Directories
The following directories are explained in this article:
Term | Explanation |
---|---|
The server's /home directory | The directory on the web server where all users are located. |
The user's home directory | The individual user's directory. |
The website directory | The specific directories for every website managed by the user. |
This is a simple representation of how each term above is organized on the server for multiple users.
/home
/user1
/example1.com
/example2.com
/user2
/example3.com
/example4.com
Directories on the server
The server's /home directory
The /home directory is the directory on the server where ALL users are located. This is referenced as /home. On the server it would simply look like this:
/home
- Users do not have access to this directory.
- This directory only contains user directories.
- These user directories contain websites.
The user's home directory
The user's home directory is specific to a single user on the server. It is one of many users listed in the /home directory on the server. For example:
/home /user1 /user2
/user3
Only your user has access to this specific user directory. No one else can access it.
SSH
If you have logged into your server via SSH, you can run the pwd command to view which directory you're currently in. This is how it would appear if you're already in your user's home directory.
[server]$ pwd /home/user
You can navigate into this directory using ~ symbol. For example:
[server]$ cd ~
What is this directory used for?
This is where all of your website and user configuration files reside. Here you can access your .bash_profile, access and error logs, and customize your PHP settings in a phprc file. Here is how it would look in an SFTP client like Filezilla:
Default files in the user's home directory
These are the default files you'll see in the user's home directory.
/home
/user1 .alias .bash_profile .bashrc .cshrc /Maildir /logs /example.com
The website directory
The website directory is where your actual website files are located. For example:
/home
/user1
/example.com
When you add hosting to a website in the panel, a user is assigned to it. New websites have the following files added to the website directory:
- favicon.ico
- favicon.gif
- quickstart.html
favicon.ico and favicon.gif help prevent server load from excess 404 pages when the site is experiencing heavy traffic from visitors or web crawlers. quickstart.html acts as the default index page when no other valid index files are present. See this article for more information.
Here is how it would look in an SFTP client like Filezilla. You will see all of your website files listed.
One user per domain policy
A website can only belong to a single user, but a single user can have multiple websites under it. See the One user per domain policy for further details.