Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

If I have my virtual host configured as:

<VirtualHost *:80>
    ServerName foo.com
    ServerAlias www.foo.com
    Include conf.d/foo.conf

Can I get by with a single domain SSL certificate or must I purchase a wildcard SSL certificate to handle the www subdomain?

share|improve this question

1 Answer 1

To prevent a Common Name mismatch, you will need to purchase either a wildcard certificate or a Subject Alternative Name (SAN) certificate. The SAN certificate will allow you to specify multiple CN. SAN certificates are also known as Unified Communications Certificates.

If cost is an issue, it is not unreasonable to only use SSL for www.domain.com and not domain.com. It is often more difficult to justify the additional cost for wildcard certificates.

share|improve this answer
Standard GoDaddy certificates provide both www.domain.com and domain.com in the "Certificate Subject Alt Name" field. Other vendors may do this as well. In practice this does prevent the need for using a wildcard certificate to deal with the www and non-www case. –  iPaulo Mar 18 '10 at 18:51
Comodo, DigiCert, and Globalsign add a free www as well –  Robert Mar 22 '10 at 14:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.