Changed host to hostname to avoid illegal url if a port is used