Change Document Root
This page explains the Change Document Root feature in GoAdmio. It lets you change the directory from which a domain (primary, addon, or subdomain) serves its website files.
Location: Admin Panel → Domains → Change Document Root
Location (User Panel): Domains → Change Document Root
Overview
Every domain on a GoAdmio server has a document root — the directory the web server reads to serve files for that domain. By default, GoAdmio creates a directory such as:
/home/<username>/www/<domain>— for the primary domain/home/<username>/www/<domain>— for addon domains/home/<username>/www/<subdomain>.<domain>— for subdomains
- You want a domain to serve files from a different subdirectory (e.g., a
public/folder in a Laravel app) - You are migrating a site and want to point the domain at its existing files before changing DNS
- You want two domains to serve the same content (though Domain Aliases is usually better)
- You are restructuring the account's directory layout
- A framework (Laravel, Symfony, Node.js apps) expects a specific public folder
index file or wrong permissions, the site will show 404, 403, or a default page. Always verify the new path before saving.
What the Page Shows
| Field | Description |
|---|---|
| Domain | The domain whose document root is being changed |
| Current Document Root | The currently configured path (e.g., /home/example/www/example.com) |
| New Document Root | The path you want to use instead |
| Validation | Whether the path exists and is writable |
| Save / Change | Apply the change |
> Tip: The document root path is usually relative to the account's home directory, but the panel may accept an absolute path. Verify the format the page expects before entering a value.
How to Change the Document Root
Via the Admin Panel
- Log in to the GoAdmio Admin Panel (or User Panel).
- Navigate to Domains → Change Document Root.
- Select the domain you want to change.
- Review the Current Document Root.
- Enter the New Document Root — for example:
www/example.com/public — a Laravel/Symfony-style public folder
- www/example.com/public_html — an alternative root
- www/example.com/wp — a WordPress installation in a subfolder
- Ensure the new directory exists and contains an
indexfile (or add one). - Click Save (or Change).
Via the User Panel
If enabled for the account:
- Log in to the User Panel.
- Navigate to Domains → Change Document Root.
- Follow the same steps as above.
What Changes
| Item | Changes? | Notes |
|---|---|---|
| Web server document root | ✅ Yes | The domain serves files from the new path |
| Files on disk | ❌ No | Nothing is moved; only the web server's pointer changes |
| DNS records | ❌ No | Unchanged |
| SSL certificate | ❌ No | Unchanged |
| PHP version | ❌ No | Inherited from the account or set per domain |
| Email accounts | ❌ No | Unchanged |
| Databases | ❌ No | Unchanged |
> Tip: Changing the document root does not copy or move files. If you want the site to serve from a new location, upload or move the files there first.
Common Document Root Layouts
| Scenario | Typical document root |
|---|---|
| Standard HTML/PHP site | www/example.com |
| WordPress | www/example.com |
| WordPress in a subfolder | www/example.com/wp |
| Laravel | www/example.com/public |
| Symfony | www/example.com/public |
| CodeIgniter | www/example.com/public |
| Node.js app behind a reverse proxy | www/example.com/public (or the app's public folder) |
| Staging site | www/example.com-staging |
> Warning: Serving from a framework's root (not its public folder) can expose sensitive files — .env, composer.json, source code, config files. Always point the document root at the public folder for frameworks that have one.
After Changing the Document Root
| Task | Why |
|---|---|
| Verify the new path has an index file | Without one, the domain shows a default page or directory listing |
| Check file permissions | Files should be 0644, directories 0755; see Fix Permissions |
| Test the website | Confirm the site loads from the new root |
| Check the .htaccess or web server config | Some frameworks require specific rewrite rules |
| Re-issue SSL if needed | SSL is bound to the domain, not the root, so normally no change is needed |
| Clear caches | CDN or full-page cache may still serve the old content; see Cache Website |
| Check logs | If the site shows 500/403, check /var/log/httpd/error_log for path issues |
| Take a snapshot | Capture the post-change state; see Snapshots |
> Tip: If the site shows a directory listing after the change, there is no index file in the new root. Add index.html or index.php, or adjust DirectoryIndex — see Apache Configuration.
Reverting a Change
To revert the document root to its default:
- Open Domains → Change Document Root.
- Select the domain.
- Restore the original path (e.g.,
www/example.com). - Click Save.
www/<domain> — but check the account's directory structure via File Manager or SSH to confirm.
Related Commands
| Command | Purpose |
|---|---|
| /go/conf | Rebuild web server configuration after a document root change |
| /go/conf --force | Force a rebuild if the change does not apply |
| /go/checkssl | Verify SSL still works after a change |
| /go/fixpermissions | Repair file ownership after moving files |
See Command Reference for the full CLI list.
Related Pages
- Create Subdomain — create a subdomain with its own document root
- Addon Domains — add a separate domain with its own document root
- Domain Aliases — serve the same content under a different domain (better than pointing two domains at the same root)
- Make Primary — promote an addon domain to primary
- Change Primary Domain — change the account's primary domain
- File Manager — inspect the new document root
- Fix Permissions — repair file ownership
- Cache Website — purge cache after a document root change
- Install Free SSL Certificate — SSL for the domain
- MultiPHP Manager — PHP version for the domain
- Apache Configuration —
DirectoryIndexand related settings
Troubleshooting
| Problem | Likely cause | Solution |
|---|---|---|
| Site shows 404 after change | No index file in the new root, or wrong path | Add an index file; verify the path with File Manager |
| Site shows 403 Forbidden | Directory permissions too restrictive, or no index | Set directories to 0755, files to 0644; see Fix Permissions |
| Site shows 500 Internal Server Error | Framework config or .htaccess references the old root | Check error log; update the framework's config; verify rewrite rules |
| Directory listing shown | No index file and directory listing enabled | Add an index file, or adjust DirectoryIndex in Apache Configuration |
| Site shows the old content | Browser or CDN cache | Purge cache via Cache Website; hard-refresh the browser |
| Change does not apply | Config not rebuilt | Run /go/conf; or re-save the change |
| Sensitive files are now exposed | Document root points at the framework root, not public | Change the root to the public folder; move .env and config files out of the web root |
| SSL error after change | Unrelated to the root — certificate issue | Run /go/checkssl; re-issue if needed |
| Wrong domain serves the content | Multiple domains point to the same root | Use Domain Aliases for shared content, or give each domain its own root |
| New path does not exist | Typo, or directory not created yet | Create the directory first via File Manager, then set the root |
Best Practices
| Practice | Why |
|---|---|
| Create the directory first | The document root must exist before the site can serve |
| Always include an index file | Prevents 404 and directory listings |
| Point frameworks at their public folder | Exposes only public assets; hides .env, config, source |
| Use .htaccess or web config for rewrites | Frameworks and CMSs rely on rewrite rules |
| Verify file permissions | 0644 files, 0755 directories |
| Purge caches after the change | Prevents stale content |
| Test in a browser | Confirm the site loads from the new root |
| Keep a note of the original path | Makes reverting easy |
| Take a snapshot | Rollback path if the change breaks the site |
| Avoid pointing two domains at the same root | Use Domain Aliases instead — cleaner and avoids SEO/canonical issues |
Last updated: 2026-11-08