When you start a new blog or a website, after you have selected a domain name, you have the option to use www with a domain name or use the domain name without www. It was an enormous achievement for a 9th-grade student 15 years ago to know that ‘www' stands for “world wide web”. Now it is sort of obvious. You don't need to use this. Or it's your personal preference if you want to use it. You should follow the below action points to address the www or no-www option:
1. Decide to use or not.
You must use one thing. Using both causes problems in Search Engine listings. Such an example is given at DailyBlogTips about Digg.com where they were using both options and it lead to duplicate listing of their site causing low ranking although collectively they were having maximum traffic. Because www acts as a subdomain and search engines consider it a separate entity for the content. You may use either for your liking. If it looks good written with your domain name, go for it. And if you like the domain name without www prefix, just drop it. But once you have decided, stick with it. Don't change later and do the following.
2. Setup redirects:
After deciding, setup redirect from www to non-www version or vice versa. Mark Aaron has explained how to setup 301 redirect using .htaccess. This is not necessarily needed if you are using WordPress.
And if you are hosting your website with WPEngine, you must add Domain redirection from Domains option in your WordPress install. Add redirection from www to non-www version or otherwise as per your choice. It will look like as in below image after completion.
3. WordPress Setting:
If you are using Word Press as your blogging platform, go to Settings > General. There are options of WordPress Address and Website Address. Write your URL either with www or no-www as you have decided earlier.
4. Add Preferred Site option to Google Webmasters Tools.
First of all, you will need to verify your domain with and without www separately in Google Webmasters Tools. After verification of both variants, go to either site settings and set your preferred domain as per your decision earlier. It will look like below.
What is your choice about www or no-www and what are you using? Did you start considering this as you started your website or came to know at later stage?