Clouzark

Custom domains

Serve a project from your own domain with automatic TLS.

Every project gets a default URL. To add your own domain:

clouzark domains add www.example.com

The CLI prints the DNS records to create at your DNS provider: a CNAME for subdomains, or an A record for an apex domain. Once the records are in place:

clouzark domains verify www.example.com

Clouzark checks the DNS and issues a TLS certificate automatically.

clouzark domains ls
clouzark domains rm www.example.com

www and the bare domain

When you add a bare domain such as example.com to production in the dashboard, Clouzark offers to add www.example.com too, with the option ticked by default. The www address redirects to the bare domain with a 308, so visitors who type www. get a valid certificate and land on the same site instead of a browser error.

  • Create DNS records for both: an A record for example.com and a CNAME for www.example.com.
  • The option isn't offered for subdomains, or when the domain serves a branch, preview, or custom environment instead of production.
  • If www.example.com is already connected to another project, the bare domain is still added and the dashboard says why www was skipped.
  • To serve www and redirect the bare domain instead, add www.example.com on its own, then point example.com at it with clouzark domains route example.com --redirect www.example.com --status 308.

Serve a branch

A domain serves production by default. It can serve one branch's newest live deployment instead, for example dev.example.com for the dev branch:

clouzark domains add dev.example.com --branch dev
clouzark domains route dev.example.com --branch dev     # an existing domain
clouzark domains route dev.example.com --production     # back to production
clouzark domains route old.example.com --redirect www.example.com --status 308
clouzark domains route qa.example.com --preview         # newest preview of any branch
clouzark domains route test.example.com -e test         # a custom environment

In the dashboard, open the domain under the project's Domains tab and choose where it points.

On this page