With RapidSSL if you order a cert for www.domain.com then it will also cover domain.com. But if you order a cert for domain.com or sub.domain.com then it will NOT secure the www.domain.com.
So basically make sure your CSR request is for www.domain.com if you want to also secure the root domain.