Web Designer and Search Engine Marketer

Welcome to the Blog of a Web Designer and Search Engine Optimizer from Makati, Philippines

Web Design and Search Marketing Blog covers topics under Web Design and Search Engine Marketing


SEO friendly redirect domain.com to www.domain.com


Posted on July 18th, 2006 | Subscribe in a Reader | Subscribe by Email

Last week, I noticed that there is a PageRank difference between palconit.com and www.palconit.com. http://palconit.com is PR3 and http://www.palconit.com is PR0. To make all my traffic and PR to go to http://www.palconit.com, I applied .htaccess 301 redirect.

.htaccess redirect

Most major sites redirect their site from domain.com to www.domain.com (see Google, Yahoo, Microsoft, etc.), so I made it a point to apply it on my site. To do this, create an .htaccess file on your root directory and add this:

RewriteEngine On

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

This will redirect domain.com to www.domain.com

If you prefer to use domain.com than www.domain.com, you can visit http://no-www.org/ and read what they think about this. Also take time to read Matt Cutt’s advice on URL Canonicalization.

php 301 redirect

Here is the code in index.php:

< ? php
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.palconit.com” );
?>

Thanks!

UPDATE (December 13, 2006):

If you want to be on top of Google MSN and Yahoo, make sure your domains are all the same on all three search engines. I mean, if you are listed as “palconit.com” on both Google and Yahoo but listed as “www.palconit.com” on MSN, these two are technically different although it’s the same to most regular surfers. To make your domain all the same on three engines I suggest you follow the domain listed in MSN as they are not very flexible on changing the domain you decided. I hope this is clear.

Related posts:

  1. Why do we need Pay Per Click?
  2. Mid Year SEO Hype
  3. Search Engine Optimization
  4. Why is On Page Optimization Important?
  5. Introduction to Search Engine Marketing
  6. Change .php to .html using .htaccess or httpd.conf
  7. Why do we need to learn Web Analytics?
  8. Social Web Hosting Network
  9. Common SEO Errors With Retail Websites
  10. Introduction to Affiliate Marketing
View Blog Archives: Click here

9 Responses to “SEO friendly redirect domain.com to www.domain.com”

  1. Filipe Alves Ferreira Says:

    Hi Alfredo,

    I\’m very happy to meet you. You are my first contact in Phillipines. I\’m in Spain, at Pontevedra.
    Regards/Filipe. Visit loscedros17.spaces.msn.com

  2. Jhay Says:

    Hmm…pretty interesting. I wonder which is more SEO friendly? http://www..domain.com or domain.com? I mean does it matter for searcg engines? From my experience, people always remembered the domain.com and quickly disregarded the http://www. prefix. It\’s saves tongues from twisting and saves you four extra keystrokes especially when most Pinoys access the net tru cafes which they have limited time. Visit jrocas.com.ph

  3. Alfredo Says:

    I am not sure if search engines prefer www or no-www in ranking sites. It is just that there is a PR difference in domains with www and without http://www. When it comes to human-friendliness, its easier to remember the no-www than saying www everytime we mention a site. One example why this is important is the STI website. check out their sti.edu.ph (it has nothing on it) and sti.edu.ph with http://www. The webmaster must have overlooked this one.But major sites are redirecting their no-www domain to http://www. I am not sure why but I think it is nicer to look at.

  4. shane Says:

    I prefer no-www domains especially with subdomains. :)

  5. Alachsalieskdadsich Says:

    Hi

    Haven’t had much luck finding such a good info! GREAT JOB!
    G’night

  6. JohnDo Says:

    I wanted to thank you for the time you spent building this page.

  7. fish_hfd Says:

    It’s nice

  8. dradaykip Says:

    alfredo.palconit.com - The most necessary site

    Thank you, I will add it to my bookmarks

    regards

    Dolly

  9. Garry Says:

    That’s very cool.. I’m definitely going to apply it on my site

Leave a Reply


Search  

I RECOMMEND

 

CHECK THESE OUT