pier_

Domains

Your hostnames on app and site targets — DNS verification, certificates, renewal

pier.yaml
environments:
  prod:
    apps:
      - name: api
        targets:
          - name: primary
            domains:
              - host: api.acme.example
    sites:
      - name: www
        targets:
          - name: primary
            domains:
              - host: www.acme.example
pier ls domains
output
→  No custom domains.

A domain is one hostname attached to one app or site target. Pier verifies that DNS points at the target and that you control the name, then issues and renews the certificate. The target's generated hostname continues to work as well.

Configuration

KeyMeaning
targets[].domains[].hostThe hostname

Verification

RecordNameValueProves
CNAMEthe hostnameapp: the target's hostname; site: the shared site target shown by pier add domainrouting
TXT_pier.<hostname>pier-verify=<token>ownership

pier ls domains shows verification (pendingverified) and tls (pendingactive). Verification is retried with backoff until both records resolve, and re-checked periodically afterwards.

Commands

CommandDoes
pier add domain api.acme.example --app api / --site www, pier rm domain api.acme.exampleattach, detach
pier ls domains, pier info api.acme.examplestate, the records to create, the token

Tasks

Add a custom domain

On this page