But then you group them again with those second CNAMES into a single hostname.. So you'd still end up with a lot of TXT RRs at a single location, thus potentially causing issues.
And you don't need any A RRs for the dns-01 challenge when working with CNAMEs (assuming otherwise functioning DNS). It works with TXT RRs.
Not here either (I assume example.2.example part was a typo)
Yes, respectively. Note the CNAME as used here is a redirect, if that helps.
I only noted the concern about "too many" TXT records as you never said how many of these you have. I assume now you do have a lot which is why you've grouped them.
You now have to use an ACME Client that can place the TXT records at the proper place in the example3 zone. I believe lego does that (link here) and acme.sh does in its alias feature. The lego docs link to this Let's Encrypt page which might be helpful for your understanding.
These twists and turns would be eliminated by changing your DNS provider. More complicated setups often have more problems. If not for you then someone later. Be sure to carefully document everything you do for reference later.
This is what I think but I'm gust guessing.
_acme-challenge.cert.example3.com=token1 (for example.com)
_acme-challenge.cert.example3.com=token2 (for *.example.com)
_acme-challenge.cert.hosting.example3.com=token3 (for *.hosting.example.com)
Thanks again for everyone's help but I'm having a hard time getting my head around all this.
It came up earlier but are you sure you need a wildcard cert?
Because if your list of domain names is fairly static you could use the HTTP-01 challenge instead. This relies on a webserver to reply to the challenge. Some ACME Clients even have a standalone server in case you don't have one. The HTTP Challenge is generally easier to setup and automate than the DNS Challenge.
Let's Encrypt allows up to 100 names per cert. Although, certs are usually easier to manage in smaller groups. You haven't said much about how you plan to use these certs so hard to give specific advice without knowing that.
My list of samples are static but my real life situation isn't, some may have only 2 domain names and others may have several.
Yes, at first I was able to use http challenges but the issue came up with things like mail.example.com and autodiscover.example.com then things didn't work that's when I started looking into DNS challenges.
Trust me this project has expanded way past where I thought it was going to be but I'm getting close so that's good.
Yeah, I'd guess because you don't have anything listening on HTTP (port 80) for those names. Which is when using a standalone listener can help or even setup a "fake" listener in a web server just for port 80 challenges.
There are also options like caddy server. Or mod_md if using Apache. Both can easily manage HTTP challenges for wide variety of names (or TLS-ALPN or DNS challenges).
What would the purpose of those A RRs be? The only thing Let's Encrypt would be looking for, is TXT RRs. It would follow the CNAME to e.g. example1.example3.com and again look for a TXT RR. Those A RRs would be of no use at all.
Unless you need the hostnames e.g. example1.example3.com to be resolvable to an IP address for any other reason than the dns-01 challenge.
Don't I need an A record for example1.example3.com in the third party DNS that has the text records when I on my ISP DNS I have the following text record _acme-challenge.example1.com=CNAME example1.example3.com?
And yes text records are added to example1.example3.com
_acme-challenge.example1.example3.com=token1
_acme-challenge.hosting.example1.example3.com=token2
Your ISP DNS would not resolve anything, it would tell the DNS client to fetch the result from the CNAME. Certbot, using some kind of DNS API plugin, would add the required TXT RRs to your third party DNS zone, which then can be fetched.
That's fine, it just doesn't need A RRs.
By the way, if you're adding the TXT RRs to _acme-challenge.example1.example3.com (thus including _acme-challenge, I believe you should also add _acme-challenge.example1.example3.com as the CNAME value, thus also including _acme-challenge. Or don't add _acme-challenge on these items.
Ok so I can get rid of _acme-challenge, that's good to know, I believe someone else said that but I didn't understand. So the text record key can be example1.example3.com.
If I understand you correctly, when a DNS client contacts my ISP DNS and asks for the acme text file if the value is a CNAME pointing to example1.example3.com the DNS client will go to example1.example3.com to query for the text records.
How does the client DNS know where to go, if my third party DNS doesn't have some sort of record (A, CNAME, etc.) for example1.example.com then then how do they query for the text records?
It won't "go" to that hostname, it will resolve that hostname, to entirely different things. There might not even be a DNS server running on example1.example3.com.
In order to reduce the number of text records I thought I could create several subdomains and that would be responsible for smaller groups of the domains that I wanted validated.
example: example1.example3.com example2.example3.com
This in combination with adding text records on my ISP DNS for the domains I wanted validated that included a CNAME pointing to the subdomain for each group.
The issue is there seems to be a difference between a DNS subdomain and a DNS subdomain record.
When I looked at the documentation of mt third party DNS provider on how to subdomain I didn't realize there was a DNS subdomain and a DNS subdomain record.
I followed the instructions to create a subdomain record which is not what I wanted.
Unfortunately the ability to create a SNS subdomain is only available on the enterprise plan of the third party DNS provider and that's and that's not in the budget.
I chose the third party DNS provider as they were the only one I was familiar with but now it looks like I need to do some research to find one that will allow DNS subdomains and is within the budget.
I have a specific hostname in Cloudflare as a "Website" with name "osirisinferi.subdomain.example.org" on a Free plan as "DNS only". I do not own subdomain.example.org, it's a service that offers free subdomains.
I can get a certificate with the certbot-dns-cloudflare DNS plugin for foo.bar.baz.osirisinferi.subdomain.example.org without any issue?
What kind of issue are you actually running into and did you try it already?
Edit:
Above was an example to show that Cloudflare really doesn't care much about (subsubsub)subdomains. Certbot however doesn't like CNAMEs, so you'd need to use e.g. lego or acme.sh. But that was always required when using CNAMEs to begin with.
I haven't tried anything yet I've been trying to get information on how I would set things up but you just seem to be telling me that everything I'm preposing is wrong!