smarter domain-server hostname switching