This method smells like it should be broken down to smaller methods. One such helper method would be one that just compares two hostnames to each other.