Dokku Deploys To Every Domain and Subdomain

February 12, 2016 668 views
Dokku Ruby on Rails Deployment Ubuntu


I'm currently developing Rails web app and I deploy it with Dokku to this droplet. I linked the droplet to my domain name. with the following settings:

A record @ >> droplet IP
A record * >> droplet IP
CNAME www >>

I have deployed to subdomain however whenever I open random subdomain such as and even the root domain (, it will be redirected to the app.

How to fix the issue? Thank you.

1 Answer

Nginx will forward everything to the last server block config it can find. You need to have a default server set in nginx's config and make sure it returns 404.
See this StackOverflow answer on how to configure this.

Have another answer? Share your knowledge.