extra code to figure out which alias should be used for the domain name