What is the message you are getting from Google exactly?
Canonical can refer to the www or non-www part of the url.
Here is Matt Cutts of Google's explanation-
Q: What is a canonical url? Do you have to use such a weird word, anyway?
A: Sorry that it’s a strange word; that’s what we call it around Google. Canonicalization is the process of picking the best url when there are several choices, and it usually refers to home pages. For example, most people would consider these the same urls:
But technically all of these urls are different. A web server could return completely different content for all the urls above. When Google “canonicalizes” a url, we try to pick the url that seems like the best representative from that set.
You can set the www or non-www in htaccess and in Google Webmaster.