Why is this important? There are several reasons. First, search engines don't like it when a website's address will sometimes show as www.example.com and other times it shows as example.com. Search engines will sometimes view this as two different websites with duplicate content. The easiest way to fix this is to force the URL to always show the www before the domain name.
Some Wordpress Plugins (like S2Member) also require the 'www' in the URL in order to function properly. The trick, however, is getting the job done.
If you search the web, you'll find a plethora of information about how to force the www in the URL. Some sites suggest editing the HTACCESS file. This may or may not work depending on your setup, but it didn't work for me.
I also tried calling tech support for my host (GoDaddy.com) for help in reconfiguring the CNAME in the Domain Manager. This didn't work either. The good folks at GoDaddy informed me that things were set correctly to force the www on the server, but that Wordpress was overwriting their configuration.
After hours of frustration of trying every suggestion on the web, I finally found the answer in the Wordpress settings (and you wouldn't believe how simple it was to fix)! Here's how I fixed the problem.
- Log into Wordpress
- On the left side of the screen, scroll down to SETTINGS and click GENERAL
- Change the Wordpress Address URL) to www.example.com (replacing example.com to your domain)
- Change the SITE URL to www.example.com (replacing example.com with your domain)
- Scroll down and click the blue SAVE CHANGES button