Encodes connection url