To choose the version of the domain that's used, whether it be www or non-www navigate to Settings >> Advanced Settings and search for:
Www Or Non-Www
System Variable: preferred_domain
This drop down allows to select www to include www in the domain of the site, or non-www to exclude www from the domain. After changing this setting, please refresh the HTAccess File to implement the change.