Fix HTTPS check for external hostings