get protocol domain and port from url