Forcing WWW to Show in URL in Wordpress

Wordpress is a great place to host a blog, but it does have its frustrations.  I won't go into them all here, but one thing that I and others have found very frustrating is forcing the web address to show 'www' before the domain name. 

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.
  1. Log into Wordpress
  2. On the left side of the screen, scroll down to SETTINGS and click GENERAL
  3. Change the Wordpress Address URL) to www.example.com (replacing example.com to your domain)
  4. Change the SITE URL to www.example.com (replacing example.com  with your domain)
  5. Scroll down and click the blue SAVE CHANGES button
 That's it.  No need to edit the HTACCESS file, PHP files, or any other files (in this case anyway).