deal with and without domain name