One structural suggestion if this keeps happening: switch that domain to a DNS-based challenge.
It proves control by writing a record rather than serving a file, which means it does not care about port 80, proxies, redirects, authentication, or whether the site is even running. It is also the only option for a wildcard certificate and for a host with no public web server.
The cost is that your client needs credentials for your DNS provider, so scope that credential to the one zone if the provider allows it.