Wildcard Certificates
Problem
You want to use a single certificate for multiple hostnames in the same domain.
Solution
Use a wildcard certificate, which works for any name within a particular domain, such as “*.example.com.”
Discussion
Using the technique described in Recipe 7.2, create a
certificate with a Common Name of *.example.com, where example.com is the domain for which you wish
to use the certificate. This certificate will now work for any
hostname in the example.com domain,
such as www.example.com or secure.example.com.
On many browsers, however, the certificate will not work for
example.com or for one.two.example.com, but only for hostnames
strictly of the form .hostname.example.com
Most certificate authorities will charge considerably more to sign wildcard certificates. This is not because it is somehow more complicated to sign these certificates, but because it is a simple business decision, based on the fact that buying a wildcard certificate means that you don’t need to buy multiple single-host certificates.
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access