SSL working on root, but not on www

This is almost always going to break your entire domain. For this to do the Right Thing your DNS server has to do CNAME flattening.