Dokku and preventing random domains

  • Posted October 9, 2014

I have a dokku instance set up and all seems to be working fine however if I hit random subdomains instead of being served a 404 or site not found I get served what seems to be the last application I deployed.

for example I have just deployed my personal site at and however if I got to lets say I still get served my site.

Is there anyway I can stop this?

Thanks in advance


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

It’s because nginx is only loading the configs from docker it will default to the last server defined. All you need to do is enable the default server config:

cp /etc/nginx/sites-available/default /etc/nginx/sites-enabled/
nginx -s reload

That way nginx has a default config to go to – you could update /etc/nginx/sites-available/default to place your own 404 or holding page.

I hope that helps