Use your own domain for generated names
Add a hostname base so apps get generated names under your own domain, served with one wildcard certificate.
Goal: apps get their generated names under your own domain, such as
api.apps.example.com instead of a name under the A-Line content domain, without
adding a custom domain per app.
A hostname base is a name such as apps.example.com. Generated app names
become <app>[--env].<base>, all served with one wildcard certificate for
*.apps.example.com. Custom domains on apps are not affected.
Before you start
- The organization Admin role.
- A dedicated cluster. Hostname bases need a dedicated cluster for now: a base's wildcard record points at one cluster's edge. Apps on the hosted platform keep their A-Line names.
- The parent domain (
example.com) verified for the whole domain on the Domains page (see organization domains). The base must sit strictly under it. - Access to the DNS records of that domain.
Add a hostname base
Open Domains and find Hostname bases.
Enter the Base name, such as apps.example.com, pick the Cluster that
serves it and select Add hostname base.
The base shows Waiting for DNS with two CNAME records. Create both at your DNS provider:
*.apps.example.compointing at the cluster's edge._acme-challenge.apps.example.com, which lets A-Line.cloud issue the wildcard certificate. Your other records stay yours.
Select Check now. Once both records resolve, the base moves to Issuing certificate and then Active.
A base serves *.<base> from its cluster, so only projects on that cluster
can use it.
Use the base
Pick the base at the level you want. An environment's pick wins over a project's, and a project's over the organization default.
| Level | Where | Choice |
|---|---|---|
| Organization | Domains > Hostname bases > Make default | Every project and environment that inherits it. |
| Project | Project settings > Network > Hostnames > Hostname base | Organization default, A-Line content domain or one of the bases. |
| Environment | The environment's General settings > Hostname base | Each project's setting, A-Line content domain or one of the bases. |
Changing the base asks you to confirm Move app names: apps whose generated name changes get the new one at once, and their old names keep serving for 7 days, so links don't break mid-deploy. Stop using as default moves apps that inherited the base back to the A-Line content domain, with the same 7 days.
In a project link, set the project's base in
project.yaml; the console then shows the pick as set by project.yaml:
# yaml-language-server: $schema=https://a-line.cloud/schemas/iac/v1.json
version: 1
name: shop
cluster: hetzner-fsn1
hostnames:
base: apps.example.comUse platform for the A-Line content domain, or leave hostnames out to inherit.
The bases themselves are listed under
hostname_bases in an
organization bundle.
Pull request previews can also use a hostname base for their names.
Verify
The base shows Active. Open an app on a project that uses it: its generated name ends in your base and serves a valid certificate.
Troubleshooting
- Stays on Waiting for DNS: both CNAME records must resolve to the values shown. A CNAME can't share its name with other records. Then select Check now again.
- Broken: the records disappeared or the parent domain failed verification. The base keeps serving its last certificate; restore the records and check again.
- Can't add the base: it must be strictly under a whole domain your organization verified, and not under an A-Line domain.
- Can't delete the base: projects or environments still use it. Pick another base for them first. Deleting stops its wildcard route and certificate at once.
Next steps
- Add a custom domain to a single app.
- Preview pull requests.