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.

I want set up a wild card SSL cert for example.com and point the dns for www.somefoo.com to somefoo.example.com. Will that work (ie, will I be able to visit https://www.somefoo.com correctly, with a x-browser OK SSL connection)?

share|improve this question
Duplicate of Does an SSL certificate work on CNAME'd urls? –  Chris S Mar 1 '11 at 18:47

2 Answers 2

up vote 1 down vote accepted

You will, unconditionally, need a certificate for www.somefoo.com in order for a connection to https://www.somefoo.com to go through without error. However, there are options for how you get there..

In the best-case scenario, we'd be living in a world where Server Name Indication could be used without breaking the site for large segments of the Windows-using population; this would make it pretty easy to just set up a second certificate for somefoo.com on the same server and you'd be good to go.

Because browser support isn't there, you've got two realistic options:

1) Obtain a certificate which contains both somefoo.example.com and somefoo.com as Subject Alternate Names. This is likely not possible, as you mentioned that you're using a wildcard certificate.

2) Set up a separate web server with a somefoo.com certificate, either serving the somefoo.example.com content directly or sending redirects over to somefoo.com.

share|improve this answer

If by "point the DNS for www.somefoo.com" you mean a CNAME record or something like that, no, it will not work without a warning from the browser. If you type in or link to www.somefoo.com, that's what is checked against the SSL certificate, regardless of what your DNS records say.

What you could do is have an HTTP server at http://www.somefoo.com that does nothing but issue a 301 redirect to https://somefoo.example.com, then the browser will think that it's going to somefoo.example.com and it will match the certificate.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.