Custom domains
Serve production from your own domain.
Every web deploy gets a free URL at https://<slug>.contrast.run, for
example https://acme-store.contrast.run. It is live the moment your deploy
finishes, and it is enough to share and test.
To serve the same app from a domain you own, such as www.example.com, attach a
custom domain. Contrast points your domain at the deploy, provisions an SSL
certificate, and keeps them attached across redeploys.
What you need
- Active production hosting for the project. Hosting is $10/mo per live web project and includes one custom domain. Run usage is not currently charged. Attaching needs a billing role on the account: owner, admin, or billing.
- A live web deploy. Publish the app first (see Publish), then attach the domain.
- A domain you own, plus access to its DNS records at your registrar.
You attach one domain per project. Enter the exact hostname you want to serve,
for example www.example.com or the root example.com.
Attach a domain
- Open Deploy pane → Web → Custom domain.
- Type your domain in the field, for example
www.example.com, and press Attach. - Contrast shows a single DNS record to add. The status starts at Pending DNS.
Add the DNS record
Add one CNAME record at your registrar. Contrast gives you the exact target and a Copy button next to it.
For a slug of acme-store, the value is acme-store.domains.contrast.dev. Copy
the target from the Custom domain panel rather than typing it, so the slug always
matches your live deploy.
For a root or apex domain (example.com with no www), most registrars will not
accept a plain CNAME at the root. Use your registrar’s CNAME flattening or
ALIAS record type instead, pointing at the same target.
Automatic SSL
Once your DNS record resolves, Contrast issues an SSL certificate for the domain automatically. You do not upload or renew anything. The status moves through Issuing cert while the certificate is provisioned, then to Active when the domain serves over HTTPS.
Status states
The Custom domain panel shows a colored dot and a label. Press Refresh to re-check after you change DNS.
| Status | Meaning |
|---|---|
| Pending DNS | Waiting for your CNAME record to resolve. |
| Issuing cert | DNS resolved. Contrast is provisioning the certificate. |
| Active | The domain serves your app over HTTPS. |
| Past due | Production hosting billing lapsed. Fix billing to keep the domain routing. |
If it stays pending
- Confirm the record. At your registrar, check the CNAME name and value
match the panel exactly. A trailing dot or an extra
wwwis enough to break it. - Wait for propagation. DNS changes can take up to an hour, sometimes longer, to reach Contrast. Press Refresh to re-check rather than re-attaching.
- Check apex handling. If the domain is a root domain, confirm you used CNAME flattening or an ALIAS record, since a plain root CNAME is rejected by most registrars.
- Verify from a terminal. Run
dig www.example.com CNAME +short. It should return<slug>.domains.contrast.dev.
Remove a domain
- Open Deploy pane → Web → Custom domain.
- Press Remove and confirm.
Removing a domain stops it routing to your app right away. Production hosting
continues on <slug>.contrast.run, and you can attach the domain again
later.