Remove trailing period if domainname is empty