Changing your hosting document root
The document root is the folder in your hosting whose contents are shown when someone visits your domain. The web server always reads it as a subfolder of /var/www/html – so setting the value to public serves whatever is in /var/www/html/public.
Where to find it
In https://panel.cloudweb.sk, open your hosting and go to the Overview tab, then the Hosting Information card. It has a Document Root row showing the current path with a Change button.
How to change it
- Click Change – a text field with the current value appears.
- Type the path directly, or click the folder icon button (Browse directories) to open the Select Directory picker. It lets you browse subfolders of
/var/www/html; clicking Select This Directory confirms whichever level you're currently viewing – if you don't navigate into any subfolder and select right away, you're choosing/var/www/htmlitself. - Click Save.
The path may not contain .. or ~ – the panel rejects those with an error. Saving triggers a background reconfiguration of your hosting's web server to point at the new path; the site may be briefly unavailable while that happens.
What an empty value means
If you leave the field empty and save, the document root becomes /var/www/html directly – the root of your hosting, not a public subfolder. That matters if your application (a plain PHP site or WordPress, for example) doesn't expect a public subfolder: in that case, empty (root) is the correct choice.
Typical values
- Laravel –
public. - Symfony –
public. - WordPress and classic PHP sites – leave it empty (files belong directly in the
/var/www/htmlroot). See also installing WordPress. - Static sites (plain HTML/CSS/JS, no build step) – leave it empty if you upload files straight into the root.
Subdomains
This setting only applies to your hosting's main domain. Each subdomain can have its own document root – see subdomain settings.
Was this article helpful?
Your feedback helps us improve our documentation