Viewing Domains

To see the domains currently associated with your application:

dokku domains my-app-name

You should see at least a subdomain. Do not remove this entry.

Adding Domains

Next, you will need to add your actual domain name in order for Dokku to correctly route traffic to your application:

dokku domains:add my-app-name

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 + healthcareblocks machine identifier

Raw DNS record example:    IN    CNAME

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 ( above).

Finally, make Dokku aware of the root domain:

dokku domains:add my-app-name

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 my-app-name

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.