I'm a bit unsure on how to correctly setup the DNS text record for wildcard on sub domains
Lets say I want a cert for the following. example.com
*.example.com
*.hosting.example.com
Is this the correct way to set the DNS text records? it's the last one I'm really unsure of.
_acme-challenge.example.com=
_acme-challenge.example.com=
_acme-challenge.hosting.example.com=
Correct. Even though the wildcard and non-wildcard hostname have the same challenge hostname, they indeed have different tokens and have to be present both.
And then there's also the extra hostname for the hosting subdomain, which also needs to be present.
That said, it's recommended to automate the dns-01 challenge, because that's the whole idea behind Let's Encrypt. Automation.
I'm trying to automate the DNS challenge but unfortunately my ISP doesn't provide me the ability to update DNS and I have to send them an email for the requested changes and wait up to 24 hours for the changes to be provisioned.
My plan is to automate the sending of the email requesting the DNS changes and then poll the authorization every 30 or 60 minutes for up to 24 to 36 hours.
Once the validation process passes or fails I will continue with processing the certificate or marking it as a failure.
I know it seems a bit clunky but it's the best I can do as there is no way to change our ISP and they have no intention of updating their systems in the near future to provide me remote access.
I wouldn't recommend relying on such a system - Let's Encrypt has considered in the past to shorten the maximum authorization lifetime to 7 hours, which you would definitely have problems with. They didn't go forward on the idea as of today, but the general expectation is that you should be able to complete a DNS challenge in a few hours max.
It should be noted that the dns-01 challenge allows for CNAMEs to be used: You can delegate the _acme-challenge.... FQDNs you're interested in to a different domain, hosted by a different DNS provider (which has API access). You then deploy the token there, independent of whatever your ISP does. You only have to deploy a CNAME at your ISP once.
This technique is used by the acme-dns project, which is essentially a lightweight DNS server designed to only answer dns-01 validation requests.
Perhaps just a terminology problem but normally your domain registrar is where you configure the DNS provider. It is not the "ISP". It would be unusual for your registrar to block the use of a different DNS provider.
If you can change the DNS provider to one that offers an API (many do) that would be the easiest way forward.
That said, is this some comprehensive hosting package you have? If so and they don't offer an easy way to allow certs (HTTPS) that is a big shortcoming. If a different service is not possible maybe add a CDN in front of it that will provide HTTPS to the end user-agent.
For what it's worth, that discussion was only about the reuse after authorization, not about the time between creating an order and checking the authorization. That time (at least as of that discussion) was 7 days, and I think there was recognition that that couldn't be reduced significantly due to wonky DNS setups like the one mentioned here.
But I'll second the recommendation for acme-dns. Or, maybe you could see if you could get away without needing wildcard certificates and thereby being able to use an easier challenge type. (Few people actually need a wildcard certificate, and just automatically getting separate certificates for each name can sometimes be easier even though it ends up with more certificates.)
Yes, but it's common to validate multiple names to have on the same cert. For instance, OP seems to want a wildcard which always requires at least two authorizations. When the DNS server provider needs multiple hours for each - which could happen - then it won't work unless you specifically wait for all authorizations to be in place before validating the first one.
I'd cut ties with such ancient companies even if I was with them for 100 years.. You can't have to email to change DNS records in 2024.. How are they surviving among the competition?
I looked into the CNAME path and maybe that can work for me.
My situation is a bit more complex than I originally stated as I want a SAN certificate for multiple domains each structured the same as my original example.
Lets say I need a certificate for the following. example.com
*.example.com
*.hosting.example.com
Almost. You've got the CNAMES correct, but then you'd use the third-party DNS provider's API to set:
cert.example3.com in TXT token1
cert.example3.com in TXT token2
cert.example3.com in TXT token3
cert.example3.com in TXT token21
cert.example3.com in TXT token22
cert.example3.com in TXT token23
Or, more specifically, you'd use your ACME client's integration with that third-party provider's API to set those TXT records for you.
How many domain names in the same cert? Because there is a limit to how many TXT records Let's Encrypt will tolerate in the DNS. From here: Challenge Types - Let's Encrypt
You can have multiple TXT records in place for the same name. For instance, this might happen if you are validating a challenge for a wildcard and a non-wildcard certificate at the same time. However, you should make sure to clean up old TXT records, because if the response size gets too big Let’s Encrypt will start rejecting it.
When choosing the CNAME target maybe split your target name into groups to keep below, say, 20 TXT records outstanding at one time. Easier to split now than later.
Some ACME Clients place all the TXT records at once and others serialize it so that's a factor too. Certbot is all at once, for example.
Now this is the part I'm a little confused on.
What would the text records on the third party DNS provider look like in this case? Do they get put on example1.example3.com and example2.example3.com or would they be placed on example3.com?
Thanks again to everyone for all the help on this.
Because
[MikeMcQ] > "When choosing the CNAME target maybe split your target name into groups to keep below, say, 20 TXT records outstanding at one time. Easier to split now than later"
So I assumed I needed to group things into separate sub domains as in my example.
I used CNAMES because I don't have any other available IP addresses for the example3.com domain.