Fixing domain name validation.
Merge pull request #1761 from OliverLetterer/fixing-domain-name-validation

Fixing domain name validation.