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.comThe 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.comClouzark checks the DNS and issues a TLS certificate automatically.
clouzark domains ls
clouzark domains rm www.example.comwww 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
Arecord forexample.comand aCNAMEforwww.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.comis 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.comon its own, then pointexample.comat it withclouzark 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 environmentIn the dashboard, open the domain under the project's Domains tab and choose where it points.