make sure the generated subdomain is a valid one