Fix getDomainName on custom host key