Making HTTPS friendly