WWW or Not: That is the Question?
Posted in Apache, SEO | By LGR | On February 20th, 2007
Most people don’t realize that there website can found by using both www.mywebsite.com and mywebsite.com. Why is this important? The search engines will index both the www site and the non-www site, providing the search engine an identical set of pages which could lead to a penalty. While most search engines will eventually sort this out why wait for them to do it. Don’t give them a choice in what they index.
Create a .htaccess file and place it on the web root folder. Include the following lines of code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mywebsite\.com$ [NC]
RewriteRule ^(.*)$ http://www.mywebsite.com/$1 [R=301,L]
This will redirect all requests for pages at mywebsite.com to www.mywebsite.com giving only one copy of your website for the search engines to index. Give it a try on this blog. All requests to blog.lgr.ca are redirected to www.blog.lgr.ca.
Similar Posts:
- Tell the Robots Where Not to Go
- .html Versus .php for SEO
- Web Page Titles, Keywords and Descriptions
- 5 WordPress Search Engine Essentials
- Simple SEO for Everyone
- Webmaster Time Savers – External Style Sheet
- Include, Include_once, Require, Require_once
- Making Search Social
- Make Your WordPress Blog Search Engine Friendly
- Create Your Own Search Engine


[...] same as http://www.mydomain.com and only reports back one of the site. I would still recommend you use an htaccess redirect for the other search engines [...]