Indeed, keep available www and no-www versions for a web site can be hasardous because it generates duplicate content between two versions of your web site. And Google doesn't like duplicate content, that's why it's good seo pratice to redirect www to no-www or the opposite.
With Apache Server, you can create .htaccess file (in root of your domain) and insert these lines to redirect (301 redirect) www to no-www:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^example\.com [NC]
RewriteRule (.*) http://example.com/$1 [QSA,R=301,L]
You also can choose the opposite (redirect from no-www to www) if you prefer. No matter for seo if you choose one or other solution.