You can do that with following ways.
1.) You can add domain forwarding for your domain example.com
to www.example.com
on your domain provider. So, whenever you request to example.com
, it will be redirected to www.example.com
. By doing this, you won't see example.com
on google search results. You can see this post for example domain forwarding
2.) You can create a webmaster tools account here. After that go to Site Settings
section(On top right corener click gear icon and click Site Settings
). You can select preferred domain here with www
or without www
.