Fixed domain alias issue

Fixed issue whereby domain names were split incorrectly. Now only the first part of a dotted domain name is taken, instead of taking everything bar the suffix