I was just about to submit this, as I'm putting my web interface on a custom domain with TLS. Note that to use a custom domain one also needs to modify this line
https://github.com/pi-hole/pi-hole/blob/ba1e94d3d9cf1894e0b5adca3e92738d21897568/advanced/index.php#L60
to recognize the non-`pi.hole` domain. One either needs to hardcode it, or some configuration option needs to be offered. Since I'm not a PHP programmer, I'm not really sure how this kind of configuration is typically implemented in PHP.