To see the domains currently associated with your application(s):
You should see at least a healthcareblocks.com subdomain. Do not remove this entry.
Next, you will need to add your actual domain name in order for Dokku to correctly route traffic to your application:
dokku domains:add <app name> www.mydomain.com
The value for app name should match the same one you used when creating your app via dokku apps:create. Your domain name registrar typically provides domain name system (DNS) management functionality. There are also third-party DNS services (e.g. CloudFlare and Zerigo) that include additional benefits. You'll need to create the following DNS record to point your actual domain to your application:
- Type: CNAME
- Name: your domain name
- Value: your app subdomain and the Healthcare Blocks server address
For example, let's say you created a Dokku app, my-healthcare-app, and your Healthcare Blocks server has an address of 123456.healthcareblocks.com. Your DNS record would look like this:
www.mydomain.com. IN CNAME my-healthcare-app.123456.healthcareblocks.com
Configuring Domains Without the "www" Subdomain
Using a "naked" domain - without a subdomain - is not recommended unless you have purchased a (more expensive) wildcard SSL certificate from a third-party SSL vendor (we don't sell certs) and your DNS provider supports CNAME-like functionality at the zone apex level. However, if you do go down this route, here's what you need to do:
First check if your DNS provider supports ALIAS or ANAME records. Then create an entry there pointing the empty or @ value to your Dokku hostname (e.g. my-healthcare-app.123456.healthcareblocks.com).
Finally, make Dokku aware of the root domain:
dokku domains:add <app name> mydomain.com
Using a Load Balancer
For high availability environments using a load balancer, you will also need to make Dokku aware of the load balancer URL, example:
dokku domains:add <app name> load-balancer-dns-name.my-domain.com
We also recommend that the TTL for the domain pointing to the load balancer is set to 60 seconds. A lower cache period results in traffic being more evenly distributed.