Add domain lookup and check if port is set