Feature/domain routing

Moved #500 to develop branch. Also added support for reverse routing with host support (todo: clean it up a bit).