use hostname to replace ip