First, some background: The DNS-01 verification method of Let's Encrypt requires you to add a TXT record to a special subdomain your domain name to prove your identity. With ACMEv2, this can allow you to get a wildcard certificate, which worries me (see below). The HTTP-01 verification method proves your identity by requiring you to add a file to
.well-known/acme-challenge diretory. The HTTP-01 method does not allow the issuing of wildcard certificates.
Let's say that I register a domain with a DDNS (Dynamic DNS) provider. I get a subdomain (
mysite.dnsprovider.example) and I secure it using a Let's Encrypt certificate using the HTTP-01 challenge. I install it and go on with my day, assuming my site is secure. But couldn't the DDNS provider request a certificate for
*.dnsprovider.example using the DNS-01 and pretend to be my website with that certificate? There seems to be nothing stopping them from doing that and this seems to be critically detrimental to the security of my website. If anything I've made it easier for the provider to MitM my website since I've told them the IP address of my server. A potential way I've found to secure it is HPKP. I've read into HPKP but it's deprecated now and I highly doubt any major browsers still support it after so long. I know that I could always purchase a separate domain name, but assume that purchasing a domain name is not a viable option in this case. Besides getting a new domain name or HPKP, is there anything else I could do to avoid or at least mitigate this type of problem?
Note: I understand that Let's Encrypt's certificate issuance process is meant to be automated, but please also assume that manually configuring something on the server every time a new certificate is issued is feasible.
This question is similar to Is the _acme-challenge subdomain protected? but the key difference is that this question assumes that the second-level domain operator is the potential bad actor instead of someone requesting a third-level subdomain.