WordPress uses a .htaccess
file in your main /public_html
directory to control how requests are handled on the server.
If you login to WordPress
, then under Settings
click on General
. You should see the settings for Site Address (URL)
. If you change that URL to read http://www.example.com
then your WordPress site should always re-direct to the www
version of your domain. If you leave the www
off of that URL, then it won't.
There is not really a benefit of using the www
version of your domain name. If you're trying to rank in search engines like Google, one thing to keep in mind is canonicalization
, or essentially setting the preferred domain (www or non-www)
that Google would display in its search engine results for your website.
It's really just a matter of personal preference, but once you pick one method or the other, you should really try to stick with it.
Please let us know if you had any further questions.