X.509 certificates (often called “SSL Certificates”) are usually only bound to a single domain, usually “mydomain.com”, “www.mydomain.com” or “secure.mydomain.com”. They cannot be used on any other domain name, even if it’s a subdomain (so a certificate for “mydomain.com” cannot be used for “www.mydomain.com” and vice-versa).
There currently exist 2 other types of certificates which can be used to simultaneously secure multiple domain names simultaneously:
A relatively new type of certificate called an “SAN Certificate” - short for “Subject Alternative Name” - also sometimes called “Unified Communications Certificates” after a feature in Microsoft Exchange Server which requires this certificate type. These certificates declare a finite list of hostnames they can be used against.
Then there’s wildcard certificates. Historically these were very expensive but recently we’ve seen a huge drop in price. With one of these certs you can secure “anysubdomain.mydomain.com” including the top-level “mydomain.com”.
Without either of these SSL certificates you’ll need to get an SSL cert for each domain name you want to secure.