johnrdorazio
Basic Pleskian
I have a domain example.com to which a letsencrypt wildcarded certificate is issued.
I also have a subdomain thirdlevel.example.com which would have worked theoretically without another certificate, since the main domain is wildcarded. But the subdomain has some fourth levels to designate languages: en.thirdlevel.example.com, it,thirdlevel.example.com, fr.thirdlevel.example.com etc. These fourth levels were not being recognized by the browser as being included in the domain's wildcarded certificate, so I explicitly issued a letsencrypt wildcarded certificate for the third level domain (thirdlevel.example.com and *.thirdlevel.example.com).
The strange thing is, that when I navigate directly to the third-level domain, the correct third level certificate is seen and used by the browser, but the fourth levels are associated with the main domain's certificate by the browser and not with the third level domain's certificate. Only if I navigate to the third level domain first, and then to a fourth level domain, do they pick up the wildcarded third-level certificate. If instead I try to navigate directly to a fourth level, the browser tries to associate it with the main domain certificate. Which is a problem, because I have activated HSTS stapling on all of my domains, and when the fourth level domain tries to pick up the main domain's wildcarded certificate Chrome blocks navigation saying the certificate is not valid.
Is there any way of making sure the third-level wildcarded certificate is always associated with the fourth-level domains?
If it helps any this is my setup:
DNS records (gandi.net):
example.com A record to ###.###.###.### IP address
thirdlevel.example.com A record to ###.###.###.### IP address (same as above)
* CNAME record to example.com
*.thirdlevel CNAME record to thirdlevel.example.com
_acme_challenge.example.com TXT record for letsencrypt DNS challenge
_acme_challenge.thirdlevel.example.com TXT record for letsencrypt DNS challenge
Apache/Nginx setup for thirdlevel.example.com:
Additional directives for http / https: ServerAlias *.thirdlevel.example.com
Are there any directives I can issue to make sure the wildcarded third level certificate is associated with all fourth level domains, and not the wildcarded base domain certificate, which apparently doesn't work for the fourth level domains?
I also have a subdomain thirdlevel.example.com which would have worked theoretically without another certificate, since the main domain is wildcarded. But the subdomain has some fourth levels to designate languages: en.thirdlevel.example.com, it,thirdlevel.example.com, fr.thirdlevel.example.com etc. These fourth levels were not being recognized by the browser as being included in the domain's wildcarded certificate, so I explicitly issued a letsencrypt wildcarded certificate for the third level domain (thirdlevel.example.com and *.thirdlevel.example.com).
The strange thing is, that when I navigate directly to the third-level domain, the correct third level certificate is seen and used by the browser, but the fourth levels are associated with the main domain's certificate by the browser and not with the third level domain's certificate. Only if I navigate to the third level domain first, and then to a fourth level domain, do they pick up the wildcarded third-level certificate. If instead I try to navigate directly to a fourth level, the browser tries to associate it with the main domain certificate. Which is a problem, because I have activated HSTS stapling on all of my domains, and when the fourth level domain tries to pick up the main domain's wildcarded certificate Chrome blocks navigation saying the certificate is not valid.
Is there any way of making sure the third-level wildcarded certificate is always associated with the fourth-level domains?
If it helps any this is my setup:
DNS records (gandi.net):
example.com A record to ###.###.###.### IP address
thirdlevel.example.com A record to ###.###.###.### IP address (same as above)
* CNAME record to example.com
*.thirdlevel CNAME record to thirdlevel.example.com
_acme_challenge.example.com TXT record for letsencrypt DNS challenge
_acme_challenge.thirdlevel.example.com TXT record for letsencrypt DNS challenge
Apache/Nginx setup for thirdlevel.example.com:
Additional directives for http / https: ServerAlias *.thirdlevel.example.com
Are there any directives I can issue to make sure the wildcarded third level certificate is associated with all fourth level domains, and not the wildcarded base domain certificate, which apparently doesn't work for the fourth level domains?
Last edited: