It is very common for web sites to have multiple urls pointing to the same page. This happens especially to a website's home page and where content management systems generate dynamic urls. It wouldn't be wrong to say that the following urls are all the same:
http://helloworld.comhttp://helloworld.com/index.html
http://www.helloworld.com
http://www.helloworld.com/index.html
In actual fact they are, and typically all the above web addresses would display the same web page. From a SEO perspective that's where the problem lies.
Search engines are aware of this issue and know that a web server could display distinct pages for all the urls above. Thus they would try to pick the best urls in this group, causing you to lose control of how your site is displayed in the SERPs. The Google engineer, Matt Cutts, explains canonical urls in more detail in his blog.
The key to prevent duplicate urls is to be consistent. It is important that you use "/" instead of "index.html" when you link to the home page from other pages within your site. Further, pick the url you prefer (with or without www's) and stick to it for both incoming and internal links.
If your web site is hosted on an Apache server you can use a file called .htaccess to instruct the web server to 301 redirect the canonical urls.
There are two ways of doing this:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^helloworld.com [NC]
RewriteRule ^(.*)$ http://www. helloworld.com/$1 [L,R=301]
The above rule tells the server if "helloworld.com" is requested to permanently redirect to "http://www.helloworld.com".
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\. helloworld \.com$
RewriteRule (.*) http://www. helloworld.com/$1 [R=301,L]
This rule tells the server if "www.helloworld.com" was NOT requested to redirect to "http://www.helloworld.com".
I personally prefer the second one because it's more flexible and addresses all possible scenarios.



