use replace instead of strip for clearing hostname from fqdn