Domains
In your content root you create a subdirectory for each domain you want to serve, containing static content.
<sitehoster-config-contentRoot>/
example.com/ https://example.com
index.html https://example.com/
about/
index.html https://example.com/about/
style.css https://example.com/style.css
img/
logo.svg https://example.com/img/logo.svg
blog.example.com/ https://blog.example.com
shop.example.com/ https://shop.example.com
Contents
Each top-level folder in your content root is one site, named exactly for the domain it answers on. A subdomain is just another folder.
The files inside a domain folder are the site: plain static files, HTML, CSS, JavaScript, images,
fonts, anything a browser fetches. The layout on disk is the URL layout, an index.html
at the root is the home page and a nested folder becomes a path, exactly as the tree above shows.
If there is no explicit www subdomain for any particular domain, accessing that
subdomain will automatically redirect in the browser to the domain without www.
Notes
To browse a static site straight from local files, before it is live, give each page a
<base> in its <head> pointing, with a relative path, at the base
of the site. Then write every link without a leading /, and for an anchor
put the whole page path before the # so it resolves against the base rather than the
current file.
<!-- a page at example.com/about/index.html -->
<base href="../">
<a href="about/">About</a> <!-- not "/about/" -->
<a href="about/#team">The team</a> <!-- whole page path before the anchor -->