Skip to content

Domains

A file in domains/ is one Domain record, its role, what it hosts, its redirects and email at the domain.

A file in domains/ is one Domain: its role, what it hosts, its redirects and email at the domain. It implements the domains of the site product.

  • domains/
  • leaseline.com.mdxprimary: the Site, the App and mail
  • leaseline.app.mdxredirects to leaseline.com

Reference

The file name is the hostname, and the file is frontmatter only. Buying and connecting are Verbs, Domain.register and Domain.connect, never files.

Registrar status and certificate state are observed and never written.

KeyTypeHolds
roleprimary | redirect | mailWhat the Domain is for
hostspathThe Site or App it serves
redirectsmapHost or path to target
emailmapmailboxes at the domain, and where mail forwards

Examples

Minimal

domains/leaseline.com.mdx
---
role: primary
hosts: sites/www
---

Leaseline

domains/leaseline.com.mdx
---
role: primary
hosts: sites/www
redirects: { www.leaseline.com: leaseline.com }
email: { mailboxes: [hello, support] }
---

What it builds

The SiteBuilder compiles the file.

  • the Domain record, connected with Domain.connect or bought with Domain.register
  • DNS records for the Site, the App and mail, set with DNSRecord.set
  • a certificate, renewed before it expires
  • a Mailbox per address, authenticated with Domain.authenticate
  • the Events Domain.connected and Domain.authenticated

Routing

The hosts path serves at the root of the hostname. The API serves at /api and the App at /app on the primary Domain.

Good to know