Fixed a typo
Truncate host name to at least 2 parts

Prevent host names like 'com', 'net' etc.