Update GetDomainRoot() to support IP addresses.