How to Find Your Website's Document Root and Home Directory
Two paths trip people up constantly when working with hosting: the home directory (your account's top-level folder) and the document root (the exact folder a specific website loads from). Knowing where each is saves you from uploading files to the wrong place and wondering why nothing shows up.
The difference in plain terms
- Home directory — your personal space on the server, usually
/home/username. Everything for your account lives under here. - Document root — the public folder for a domain. Your main domain's document root is normally
/home/username/public_html. Addon domains and subdomains have their own, like/home/username/public_html/shop.
Files placed in the document root are what visitors actually load.
Step 1: Find your home directory
Log in to cPanel and look at the General Information or Statistics panel on the right — it lists your Home Directory path outright.
Step 2: Find a domain's document root
- Open Domains in cPanel.
- Each domain, addon and subdomain lists its Document Root next to it.
This is the folder to upload that site's files into. If you are using File Manager, navigate to this exact path.
Why it matters
Uploading a WordPress install or an index.html to the wrong folder is the number-one reason a "finished" site shows a blank page or a default placeholder. When something is not appearing, checking you are in the right document root is the first thing to verify.
Frequently asked questions
Should my site files go in public_html or a subfolder?
Your primary domain loads from public_html directly. Addon domains and subdomains load from their own subfolders. Always match the document root cPanel shows for that specific domain.
Where do I put files that should NOT be public?
Anywhere in your home directory outside the document root — for example directly in /home/username. Files there are not served to visitors, which is perfect for config files and secrets.
My addon domain shows the main site instead of its own.
Its document root is likely pointing at the wrong folder, or files were uploaded to the main public_html by mistake. Check the document root in Domains and upload to that path. See also why an addon domain can behave like a subdomain.
Was this article helpful?