Pick protocol based on url instead of location host.