To www or not to www that is the question

While it remains unknown if using www or not using www has any real search engine optimization bennefits is unclear. What is clear is that if you can access your site from both the www and non-www version you’ve got a duplicate content issue at hand. Duplicate content is widely thought to be a major no-no in search engines, and the pages that are duplicated will receive less bennefits from the spiders.

Not only is it bad for your search engine optimization, you can also confuse users. If a user logins to the www version, they are not logged into the non-www version, and vice versa. This could lead to users being logged out and just causing worlds of headaches for both you and them.

You may wonder how you can fix this, well the easiest way is to get your domain classifed to a “Type-B” domain that doesn’t require www to operate properly. This is the method i use, its easier and shorter to type for most people. You can achieve this for your site by simply adding three little lines into your .htaccess file on your web root.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

Replace domain with your site name, and you’re finished. You’ve now got a type-b domain which is that standard in the no-www movement.If you’d like to use the www version and not the non-www version then simply use a little different .htaccess file edit the one below works well

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

If you decide you’d rather use www for your domains and not the no-www version that is fine as well, the major point of this article is that you simply need to make sure one will redirect to the other.  Either method mentioned will 301 redirect the opposite version to your preference. We also reccomend you sign up for Google Webmaster Tools and you can also set your preference of how Google displays your URL’s there as well.

4 Responses to “To www or not to www that is the question”

  1. is there any problem if we donot use wwww

  2. No you won’t have any problems with either method you chose. Just as long as you pick one and stick to it.

  3. So why can’t we just use both? I don’t want members to get confused and not be able to access the site one way, i need to keep it open for both ways

  4. […] then run the install instructions. Also, you may want to check out this article, about using both www and non-www to access your site, and why its a bad idea ——————– Madden Forums - Alternative Fuel […]

Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>