Normally you issue a certificate for the exact site name. you should have issued it to
www.domain.com instead. For another site, e.g. www2.domain.com, you would need another certificate issued to that specific site. As mentioned above, if you are looking for one certificate to cover multiple site names, then you would typically want a wildcard certificate (*.domain.com). Antoher alternative, particularily for OWA/exchange or for just a couple of servers, you might consider a UC Certificate (multi-domain cert).
Many times, to avoid your issue, the CA will issue to the given name (site.mydomain.com) and also add a Subject Alternative Name for the www (
www.site.mydomain.com). Sounds like where you got it from does not do that.
Probably the easiest way to handle this would be to just contact the company that issued the cert and ask them to issue a replacement issued to the correct name. Pretty much all of them (I haven't heard of any that don't) will issue a free replacement certificate within a 2 weeks, up to a month for some. See if they can just use the same CSR or you may need to create a new one, but ask if they can issue it to domain.com and add
www.domain.com as a SAN value. Since it is top-level (no site name), they might have a policy against that, but I would expect a quick conversation as you probably aren't the first person to ask. As long as domain.com and
www.domain.com as hosted on the same box and provide the same content, they probably won't have issue with it.