Handle localhost and IPs