better custom domain routing, closes #47