There is a lot of confusion about the difference between setting redirects and canonicalization. Here’s the deal.
What a 301 says to search engines.
Hello, Mr. Search Engine. My page has has moved, permanently, to this other address. If you will please remove my old domain from your index and push everything through to this new one including all credit and “link juice”.
What Canonical says:
Hiya Mr. Search Engine. There happen to be multiple version of this page that you’re currently indexing. So there may be a lot of duplicate content. Could you please index only this page so that the other pages do not interfere with my rankings or how my site displays on your search results.
That’s the gist of it. Canonical links are often used wrong – there needs to be a situation where you have multiple pages with the same, or very similar content. With 301, the common mistake is to set it during a temporary move. It needs to be permanent. For temporary, use 302.