strip hostname
truncate the hostname if need be