Yes, your common name should be *.yourdomain.com for a wildcard certificate.
Basically, the Common Name is what states what domain your certificate is good for, so it has to specify the actual domain.
Clarification: It shouldn't "contain" the domain name of the sites, it should be the domain of the sites. I'm guessing there is no difference in your question, I just wanted to clarify, in case there's a misconception of what the domain should be, or what the certificate will be used for.