Redirecting to the "www" Version of Your Domain

For search engine optimization (SEO) you may need to redirect the non-www version of your domain to the www version. In other words, you want to force all traffic to your site at instead of allowing people to visit directly.

Their are two main benefits to doing this.

  1. Prevent duplicate content within search engines: A search engine might see and as two separate websites and penalize you for having identical content in two places, when in reality they're the same site.
  2. Avoid splitting analytics data: If some visitors are going to and others are going to, it's possible that your analytics software may track those visitors separately.

There are myriad resources online which explain how to resolve this problem. Here is a sample search on Google that provide links to multiple articles:

If you are on an Apache web server, here is a sample .htaccess file that you can place in your website's root folder. Note that you'll need to rename this file to .htaccess before it will work.