Custom domains and HTTPS
On this page
Every project gets a working HTTPS address on dokwe.com the moment you create it. When you're ready, connect your own domain: you add two DNS records, Dokwe verifies them, and issues a certificate.
Your automatic domain#
Dokwe gives each project an address in this form:
https://<slug>-app.dokwe.com<slug> is your project's slug, so a project called my-app is served at https://my-app-app.dokwe.com.
Each environment in a pipeline also gets its own automatic domain. Production uses the project slug. Other environments add their type, so staging for my-app is served at https://my-app-staging-app.dokwe.com. See Staging and production.
You can't remove an automatic domain. It keeps working alongside any custom domains you add.
Add a custom domain#
Add the domain#
Open your project, choose the Domains tab, and enter the hostname under Add domain, for example
app.example.com.If the project has services, pick which one the domain routes to. Main app is the default. If the project has more than one environment, pick the target environment. Primary env (auto) is the default. Then select Add domain.
Create the DNS records#
Dokwe shows DNS instructions for the new domain. Create both records at your DNS provider. See DNS records below.
Verify#
Select Verify. Dokwe checks the ownership record first, then the routing record. If a check fails, the reason appears under the domain as Verification failed. Fix the record and select Verify again.
Wait for HTTPS#
After verification, Dokwe requests a certificate for the domain. The domain's chip changes from SSL · pending to SSL · provisioned when it's ready.
The same steps from the CLI:
dokwe domains add app.example.com
dokwe domains verify shop.example.com
dokwe domains # list domains with their type and SSL statusProject → Domains → Add domain → create DNS records → VerifyThe CLI's verify and remove commands accept either the domain name or its ID. dokwe domains lists both, and dokwe domains add prints the ID and the DNS records to create. The CLI always targets the main app and primary environment. To pick a service or environment, use the dashboard.
DNS records#
You need two records: a TXT record that proves you own the domain, and a routing record that sends traffic to Dokwe.
| Purpose | Type | Name | Value |
|---|---|---|---|
| Ownership | TXT | _dokwe-verify | The token shown in the dashboard |
| Routing (subdomain) | CNAME | Your full hostname | proxy.dokwe.com |
| Routing (root domain) | A | Your full hostname, or @ | The IP address shown in the dashboard |
Use either the CNAME or the A record for routing, not both.
- TXT record. Dokwe looks it up at
_dokwe-verify.<your-domain>. The token stays the same if you remove a domain and add it again in the same workspace, so you don't need to republish it. - CNAME record. Use it for subdomains such as
app.example.com. A root domain such asexample.comcan only use a CNAME if your DNS host supports CNAME flattening or ALIAS records. - A record. Use it for a root domain when your registrar can't put a CNAME at the root. Every A record on the hostname must point to the Dokwe IP. Remove any old A records. Leftover records cause certificate issuance to fail.
If your DNS panel asks for the name relative to your zone, use @ for the root domain and the subdomain part (for example app) for anything else.
Automatic HTTPS#
Dokwe issues a Let's Encrypt certificate for each custom domain once it verifies. You don't upload or renew certificates yourself.
If issuance fails, the error appears under the domain and the chip shows SSL · failed. Fix the cause, usually a DNS record that still points elsewhere, then select Retry SSL. If the status stays at SSL · pending after verification, select Retry SSL as well.
Add the www hostname#
To serve www.example.com alongside example.com:
Verify the root domain#
The primary domain must already be verified.
Point www at Dokwe#
Add a routing record for
www.example.com: a CNAME toproxy.dokwe.comor an A record to the Dokwe IP. You don't need a second TXT record.Provision www#
Select Provision www next to the primary domain. Dokwe checks the routing record, adds
www.example.comto the same service and environment, and issues its certificate.
Provision www is only available in the dashboard.
Native projects#
For native deploys, you have two options in dokwe.yml:
- Leave
domainunset on yournginx+php-fpmornginx-staticservice. Dokwe routes the automatic domain and every domain on the Domains tab to your server, and handles HTTPS as described above. - Set
domainto a domain on the Domains tab to route that domain to one particular service, for example when one project serves several sites. Dokwe still handles HTTPS. - Set
domainto a hostname that isn't on the Domains tab to manage DNS and TLS yourself. Nginx on your server answers for that hostname directly, and certbot on the host issues the certificate by default. Hostnames inaliasesredirect todomainwith a 301.
See dokwe.yml reference for domain, aliases, and sslMode.
Remove a domain#
Select the trash icon next to the domain, or run:
dokwe domains remove shop.example.comDokwe stops routing the hostname. Remember to delete the DNS records at your provider too.