added a regex to check if domain is valid