With Google stands as the most used search engine of all time, here’s a little SEO that anyone of us can perform on our own. It’s easy and also highly important in helping our page indexing. More index, more traffic, more revenue :-)
www and Non-www
Most of us would think they are the same, thus assuming
- www.domain.com, and
- domain.com
are the same. Actually they are not. In search engine point of view, they are treated differently. Its’s up to the webserver. www and non-www can return totally different websites. Here is an example, www.phpicalendar.com and phpicalendar.com, both return different website.
Even if www and non-www return the same website, that still doesn’t mean its safe or good enough. When
returns the same result in Google index, they will not like it. Very high chance that the content will be placed under Supplemental Index.
Supplemental Index
Definition of Wikipedia says "Supplemental Result is a supplementary Google search Index of less important web pages according to the Google’s PageRank". Here’s how a supplemental result looks like:

Supplemental results do not cause a Google penalty but because they are treated as less important, they will lose their PageRanks.
301 Redirect
Your site is index by Google robots that crawls your site frequently. These robots will treat www and non-www differently, and if both have the same content, it will be treated as duplicates. 301 Redirect is one of the most commonly used method to solve this.
Under your web folder public_html/ look for a filename call .htaccess. If there is no such file, you will need to create one. Open up and insert the following script:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
This will force all visits, including robots to take the www.domain.com even if they access your site through domain.com. A good way to find out if its working is to type the domain without www on the browser url bar, hit enter and see if it changes to http://www.domain.com when the website loads up.
Related Contents |
Sponsors |
|
Posted by hongkiat in SEO , at 06.08.07
|
|

























Comments
CincauHangus June 8th, 2007
got people like hongkiat to do SEO stuff, im truly lucky. :P
Replykucau June 9th, 2007
thanks for the good tip :)
Replyk-director.com June 9th, 2007
For wordpress user, you can actually try this plugin – Enforce www.
Preference
This plugin will help preserve your permalinks by enforcing your no-www or yes-www preference (http://example.com/ vs. http://www.example.com/) and will strip off index.php from the ends of URIs.
Simple and fast. :D
ReplyCypherHackz June 9th, 2007
although i have access to .htaccess file, but i use a wordpress plugin to do that for me. and it is an alternative for those who can’t use .htaccess in their server.
ReplyFriedbeef June 9th, 2007
I use a plugin too just like Cyperhackz
ReplyKhairul June 10th, 2007
Finally..I got it work on my site ..thanks for the tips :)
ReplyIzzatz June 10th, 2007
guys, quick reminder…
for those who used enforce www plugin it wont work together with ’share this’ plugin by alexking
ive encounter this problem before, but im not sure whether they fix that bug yet
Replyweirdoux June 13th, 2007
i think there is something wrong with that link wong…
http://www.phpicalendar.com and phpicalendar.com will direct you to different site because one of that url is .net.
just click back at the url wong and you will see the different .com and .net.
Replyhongkiat June 13th, 2007
weirdoux: nice observation. It’s now fixed. Thanks for the heads up.
Replylyndsay may June 14th, 2007
Cool nice lil tip works fine
Replythanks
Larry Lim June 16th, 2007
Great post! 301 redirects apply not only to canonical problems but in situations where you have more than one domain name pointing to one website. One of my SEO clients was using domain parking, which messed up their rankings in the SERPs and I had to write a long blog post today to explain. :)
ReplyWeb Development July 20th, 2007
My site are showing supplemental results in google during some days. But now I think by including .htaccess file into my server will recover my site from supplemetal result. Thanks a lot.
ReplyTrackbacks