validate hostname before changing