The certificate is not trusted because it is self-signed wordpress code example
Example: The certificate is not trusted because it is self-signed wordpress
You can get a certificate for each subdomain, a multiple subdomain certificate
or a wildcard certificate (for *.yoursite.example).
They typically cost quite a bit more than regular certificates though, and
because you share a single certificate they are typically not the best option
from a security point of view unless you host an anything.mydomain.example type
of application where they are the only workable choice.
You also don't need multiple IP addresses if you have a SNI-capable web server.
This said, SNI is only supported in modern browsers (IE6 and below won't work
with it). Recent versions of Nginx and Apache support SNI transparently (just
add SSL enabled virtual hosts).