Yes it will. But be very careful, as
http://www.example.com/
and
http://example.com/
are NOT the same site.
A good idea is to set up a canonical site redirect, so that one of the two redirects to the other (same for any other aliases you have for your site).
So only have ONE host name that your web site works on. Not one DNS domain, just one HOST NAME. Have ALL others redirect immediately to the primary one and do not run web sites on them.
Mark