Strip leading and trailing whitepace from hostname before doing DNS lookup.