Custom Domains & HTTPS
Point your own domain at an app and get an automatic HTTPS certificate.
Every app starts with an automatic sslip.io URL, but you'll usually want your
own domain like app.yourdomain.com. Better-PaaS makes this painless and gives
you HTTPS automatically.
How it works
Better-PaaS uses Caddy as its web server. When you add a domain to an app,
Caddy automatically requests a free Let's Encrypt certificate for it — so
your site is served over https:// with a valid padlock, no manual certificate
wrangling.
Step 1 — Point your DNS at the server
Before adding the domain in Better-PaaS, create a DNS record at your domain registrar that points the domain to your server's IP address:
| Type | Name | Value |
|---|---|---|
A | app (or @ for the root) | your server's public IP |
Do this first
Caddy can only issue a certificate once the domain actually resolves to your server. If you add the domain before DNS propagates, certificate issuance will fail until it does. DNS changes can take a few minutes to a few hours.
On Cloudflare? Skip the manual record
If your domain's DNS is on Cloudflare, connect a Cloudflare API token and Better-PaaS can create this A record for you straight from the dashboard. See GitHub & Cloudflare.
Step 2 — Set an email for Let's Encrypt
Let's Encrypt uses an email address for expiry notices. Set it in the backend
environment as ACME_EMAIL:
ACME_EMAIL=you@example.comRestart the backend after setting it.
Step 3 — Add the domain in the dashboard
Open your app and go to the Domains tab.
Enter your domain (e.g. app.yourdomain.com) and add it.
Caddy requests a certificate. Within a few seconds your app is reachable at
https://app.yourdomain.com.
Removing a domain
Remove a domain from the same Domains tab. Caddy stops serving it immediately.