replace fqdn by hostname