Skip to content
novasean.

DirectAdmin

Find the correct document root for a domain

Find the document root serving the exact domain or subdomain before uploading or moving website files.

By Team Novasean · Published · Updated

Identify the served hostname before touching files

Check the document root configured for the exact hostname and protocol before uploading or moving content.

The document root is the configured directory served for a particular hostname. A common DirectAdmin layout is /home/USER/domains/example.com/public_html, but a server administrator can customise a domain, subdomain, HTTPS virtual host or application route. A familiar-looking public_html folder is therefore a clue, not proof of the effective root. This guide finds the location to use for an already configured site; it does not teach server-wide virtual-host editing.

Write down the exact hostname and scheme you are testing: http://example.com, https://example.com and https://app.example.com can behave differently. Confirm the domain is attached to the intended hosting account and that its DNS reaches that account. A DNS or TLS failure must be fixed separately before a web response can verify a root.

Compare account paths and configuration

In the DirectAdmin account, inspect Domain Setup and the File Manager for the selected domain. Note its public_html and any separate private_html or subdomain folders shown by your configuration. If the panel displays a document-root setting, record its current value; the control may be absent on shared hosting. Check whether an application installer or framework has configured a public entry directory. Do not upload the whole private application tree merely because you see an empty web directory.

If you have authorised server-administrator access, inspect the effective virtual-host configuration through the supported DirectAdmin method and distinguish generated configuration from custom overrides. DirectAdmin documents that templates and domain settings can affect virtual hosts; generated files should not be hand-edited by account users. If you only have account access and the panel does not show an effective root, ask the host to confirm it.

Use a reversible marker to prove the path

With the site owner’s approval, place a short, unique, non-sensitive text file in the candidate served directory, for example root-check-20261011.txt. Request that exact path on the exact hostname over HTTPS and, if relevant, HTTP. A 200 response with your unique text identifies a served path. A 404 can mean wrong directory, host binding or a rewrite rule; a redirect may lead to a different hostname or scheme, so inspect its Location before drawing a conclusion. Remove the marker as soon as the test is complete.

For a live application, use a low-traffic window and avoid overwriting its index file or changing file permissions just to test. If HTTPS works but HTTP differs, compare the two virtual-host routes and redirects. If a subdomain differs from its parent, repeat the marker test in its own expected directory.

For example, request a harmless uniquely named file in the candidate root and remove it after the mapping check. A missing or unexpected response is evidence to compare host and proxy configuration, not permission to move all files.

Place only public content in the proven root

Upload or deploy only content intended to be web-accessible into the verified served directory. Framework configuration, secrets, database dumps, source archives and private storage belong outside any served root or behind the application’s documented protection. For frameworks with a public entrypoint, have the host or authorised administrator configure the effective document root to that public directory where supported; do not expose the project root to compensate for an unavailable control.

After deployment, request a known page, an intentionally absent page and a static asset on each relevant hostname. Confirm HTTPS and redirects resolve to the intended application. If the wrong content appears, restore the prior files or deployment pointer, remove the test marker and provide the host with the exact URL, response and paths you tested. Do not share secrets or a full directory listing publicly.

Common questions

Is public_html always the document root? It is a common default, but overrides and subdomain or scheme-specific configuration can differ.

Can I change the server root from File Manager? Moving files does not necessarily change the virtual host. Use an available supported setting or ask the host.

Why does the marker work over HTTP but not HTTPS? Follow redirects and check the HTTPS host binding or separate path before moving the site.

Sources and technical references

Prepared by Team Novasean from the references above. Menus and available features depend on your installed version and service permissions.

Related guides

Was this guide helpful?

If you accepted optional analytics, your Yes/No answer and this guide’s page address are sent to Google Analytics. No written feedback is collected. Read our privacy statement or change your choice in .

Need help with your service?

Open your client area or contact Novasean. Describe the symptom and checks you have performed. Keep passwords, recovery codes and private keys out of your message.