How to configure MDC ssl cert on apache?

We got an MDC certificate intending to use it for multiple subdomains as advertised. The cert is for *.foo.com

However when we use it for bar.foo.com sites we get errors at least on subdomains, e.g., the cert isn’t valid because it’s for *.foo.com and not *.bar.foo.com.

What’s the fix here? Do I need alt names for all possible subdomains here? I thought that it would transparently recognize subdomains with this cert type.

thanks in advance

Multi-Domain Certificates are not wildcard certificates. The wildcard character on a certificate can only cover one level in the DNS hierarchy. E.g. *.foo.com will cover… domain.foo.com, john.foo.com, bill.foo.com but not… john.smith.foo.com or mail.office.domain.foo.com, etc.