Your own domains, and paths

Hostnames of your own, several apps on one hostname, and servers with no wildcard DNS.

On this page

An environment is at its own hostname under the server's domain, such as shop.apps.example.com. It can also be at a hostname of your own, or a path on one, so that several apps can share a hostname.

An app's Domains and access tab: a domain that does not point here yet, with the DNS record it needsAn app's Domains and access tab: a domain that does not point here yet, with the DNS record it needs
A hostname of your own, and what it needs.
moor domains add portal.example.com --app shop
moor domains add tools.example.com/reports --app reports

DNS#

A domain serves nothing until its DNS is seen to point here, by either of:

Moorage looks when it is attached, then every few minutes, or when you ask:

moor domains verify portal.example.com
moor domains
moor domains remove portal.example.com

A domain goes with one environment, and takes --env like everything else. Attaching one takes a maintainer. A hostname under the server's own domain is not needed: it names its apps by itself.

Certificates#

With tls.mode = "acme", a domain gets a certificate of its own the first time it is asked for, once its DNS points here.

The CA that Moorage makes for itself vouches only for the server's own domain, so that otherwise, HTTPS at another hostname needs one of these:

A path on a hostname#

Requests under the path go to the environment, and the longest path that fits wins. What an app must know of it:

/.moorage/ under the path belongs to Moorage. Prefer a hostname of its own for an app, if you can have one: it is the only way it can be sure of having cookies and storage to itself.

With no wildcard DNS: path routing#

If you cannot have a wildcard DNS record, a whole server can give every app a path on one hostname, and /shop/, /docs/ and /shop--staging/ take the place of hostnames:

moor server init --routing path --domain apps.example.com --console-host moorage.example.com

That needs two DNS records, and no wildcard. The console must have a hostname of its own, and the server refuses to start without one: a page of any app on the console's own hostname could act as whoever is signed in.

Suggest a change to this page