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:
- Why do we need Pay Per Click?
- Mid Year SEO Hype
- Search Engine Optimization
- Why is On Page Optimization Important?
- Introduction to Search Engine Marketing
- Change .php to .html using .htaccess or httpd.conf
- Why do we need to learn Web Analytics?
- Social Web Hosting Network
- Common SEO Errors With Retail Websites
- Introduction to Affiliate Marketing
July 18th, 2006 at 4:53 pm
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
July 18th, 2006 at 6:25 pm
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
July 18th, 2006 at 6:43 pm
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.
July 25th, 2006 at 9:30 am
I prefer no-www domains especially with subdomains.
May 23rd, 2007 at 2:06 am
Hi
Haven’t had much luck finding such a good info! GREAT JOB!
G’night
June 24th, 2007 at 1:54 pm
I wanted to thank you for the time you spent building this page.
June 29th, 2007 at 9:28 pm
It’s nice
July 31st, 2007 at 5:13 pm
alfredo.palconit.com - The most necessary site
Thank you, I will add it to my bookmarks
regards
Dolly
November 6th, 2007 at 1:54 am
That’s very cool.. I’m definitely going to apply it on my site