Dokku server hosts two sites with TLD's, both domains are landing on only one app
I have two simple dokku sites on one server. The first is a static html site, and the second is a very simple rails app. Each app has its own TLD.
For the sake of argument well give them the domains: static.com and rails.com.
Ive used the Dokku domains plugin to set both the naked and ‘www’ domains for each site. The domain names were purchased and setup through NameCheap
The namecheap domains each have two entries:
@ | http://www.static.com | URL Redirect www | static.server.com | CNAME(alias) @ | http://www.rails.com | URL Redirect www | rails.server.com | CNAME(alias)
I encountered this issue on the Dokku Github page which would indicate that this can be overcome by using the naked domain as the app name when creating the original git remote.
git remote add dokku firstname.lastname@example.org:static.com
However, that issue was closed two years ago, and the same result seems to be accomplished by the domains plugin. So im wondering if I should restart from this point with both apps?
So far the above steps has resulted in traffic from both domains being sent to static.com. Has anyone encountered this before? Is there a way to overcome this issue?