How to Transfer Google Page Rank using a 301 Redirect

Tips and help with HTML, CSS, JavaScript, and site development.
Post Reply
User avatar
ccb056
Site Administrator
Posts: 981
Joined: January 14th, 2004, 11:36 pm
Location: Texas
Contact:

How to Transfer Google Page Rank using a 301 Redirect

Post by ccb056 »

If you want to redirect a URL but you don't want to loose your Google Page Rank, there is a solution. Contrary to some beliefs, the meta tag redirect will not transfer Google Page Rank, in fact, search engine's don;t like it as the meta tag redirect can be used for spam.

However, there exists a redirect that search engines respect, espically google. This redirect is known as a 301 redirect. A 301 Redirect says the the link has permanently moved. There are many neat things you can do with a 301 redirect. They are

Link any page/subpage from a site to any page of another site
Link any page/subpage from a site to its corresponding page on a new site
Transfer Google Page Rank you gain from backlinks

All this can be done with Apache's .htaccess file and here's what your .htaccess file needs to look like:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domainname01\.com$ [NC]
RewriteRule ^(.*)$ http://domainname2.com/$1 [R=301,L]
likewise, if you want the www, use this

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domainname01\.com$ [NC]
RewriteRule ^(.*)$ http://www.domainname2.com/$1 [R=301,L]
Last edited by ccb056 on April 21st, 2004, 12:59 am, edited 1 time in total.
Matrix
Registered User
Posts: 12
Joined: April 6th, 2004, 9:23 pm
Contact:

Re: How to Transfer Google Page Rank using a 301 Redirect

Post by Matrix »

ccb056 wrote:If you want to redirect a URL but you don't want to loose your Google Page Rank, there is a solution. Contrary to some beliefs, the meta tag redirect will not transfer Google Page Rank, in fact, search engine's don;t like it as the meta tag redirect can be used for spam.

However, there exists a redirect that search engines respect, espically google. This redirect is known as a 301 redirect. A 301 Redirect says the the link has permanently moved. There are many neat things you can do with a 301 redirect. They are

Link any page/subpage from a site to any page of another site
Link any page/subpage from a site to its corresponding page on a new site
Transfer Google Page Rank you gain from backlinks

All this can be done with Apache's .htaccess file and here's what your .htaccess file needs to look like:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domainname01\.com$ [NC]
RewriteRule ^(.*)$ http://domainname2.com/$1 [R=301,L]
Don't you think that is cheating though.
User avatar
ccb056
Site Administrator
Posts: 981
Joined: January 14th, 2004, 11:36 pm
Location: Texas
Contact:

Post by ccb056 »

If you changed domains it is not cheating, you cannot do that unless you own both domains

If your old domain had a really good pagerank, but you decided to move domains, It is fair.

Google supports the idea.-> http://www.google.com/webmasters/3.html
If we continue to list an 'old' version of your site (i.e. we continue to list http://www.my123site.org despite the fact that your site now lives at http://www.my456site.org ) you need to update the links that are pointing to the sites. Since our robots jump from page to page via hyperlinks, someone must still be linking to the defunct page. Once others correct their links, we can too. Once your new site is live, you may wish to place a permanent redirect (using a "301" code in HTTP headers) on your old site to inform visitors and search engines that your site has moved.
Will.Spencer
Registered User
Posts: 15
Joined: May 23rd, 2004, 11:32 am
Location: Denver
Contact:

Post by Will.Spencer »

On the same web page, Google seems to strongly imply that a 301 Redirect will not pass PR:

"To preserve your ranking, you will want to inform any sites that currently link to your pages of your change of address. As long as the links change as you move your site over to a new location, your PageRank should not be adversely affected."


Also, why use such a complex version of Redirect syntax when the following works just as well:

Redirect 301 / http://www.new-url.com

Will
Webmaster: Tech- FAQ
User avatar
ccb056
Site Administrator
Posts: 981
Joined: January 14th, 2004, 11:36 pm
Location: Texas
Contact:

Post by ccb056 »

That version of redirect will redirect every page to one page
Will.Spencer
Registered User
Posts: 15
Joined: May 23rd, 2004, 11:32 am
Location: Denver
Contact:

Post by Will.Spencer »

ccb056 wrote:That version of redirect will redirect every page to one page
That one-line redirect will direct each page on the old site to the corresponding page on the new site.

I know, I have this working perfectly on three different sites. :)
Last edited by Will.Spencer on May 25th, 2004, 2:03 am, edited 1 time in total.
Webmaster: Tech- FAQ
User avatar
ccb056
Site Administrator
Posts: 981
Joined: January 14th, 2004, 11:36 pm
Location: Texas
Contact:

Post by ccb056 »

Ok, my mistake. :)
dougie
Registered User
Posts: 2
Joined: June 20th, 2004, 10:10 am

Post by dougie »

Hi all,

This could be just the subject I'm loooking for.

My hosts are on apache servers on freebsd.

Say, for example, I own example.com and examples.com, but example.com has never been published anywhere and I don't have hosting for it anywhere, but I would like to pick up visitors who forget to put the s at the end.

So I want everyone going to example.com to automatically be redirected to examples.com and still be on the right of Mr Google.

The one liner above looks very easy to do, but could someone please let me know where exactly would I put it ? (and yes, I have googled this, but there does seem to be some very knowledgeable members in this group that I would like to get an opinion from).

Any help very much appreciated. :)
User avatar
ccb056
Site Administrator
Posts: 981
Joined: January 14th, 2004, 11:36 pm
Location: Texas
Contact:

Post by ccb056 »

you put it in the .htaccess file in the topmost directory of your site, and you have both sites pointing to the same ip address with whoever you registered the domain names with
dougie
Registered User
Posts: 2
Joined: June 20th, 2004, 10:10 am

Post by dougie »

Apologies, my post should have stated that the forwarding domain name HAS already appeared in some of the SE's and so, I thought a 301 was the only way to redirect from that one to the new one. Bearing that in mind, would your answer still be the same ?
ponpots
Registered User
Posts: 11
Joined: June 26th, 2004, 9:02 pm
Location: catmandu
Contact:

Post by ponpots »

Thank you guys. That was really a very nice informative thread. :D
freerealestate
Registered User
Posts: 2
Joined: December 11th, 2004, 8:02 pm
Location: apartment
Contact:

Re: How to Transfer Google Page Rank using a 301 Redirect

Post by freerealestate »

ccb056 wrote:
All this can be done with Apache's .htaccess file and here's what your .htaccess file needs to look like:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domainname01\.com$ [NC]
RewriteRule ^(.*)$ http://domainname2.com/$1 [R=301,L]
likewise, if you want the www, use this

Code: Select all

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

Thanks for the code. It would be extremely helpful if I understood it.
Can you(or someone who understands it) rewrite it for the following 301 redirect problem.

I want to redirect all subdomains, all directories, and all files of domain1.info to sub2.domain2.biz

What would be the .htaccess code in this case.

Also what would I need to do to redirect 2 specific urls to another 2 specific urls.

301 redirect

sub1.domain1.info/dir1/file1

to

sub2.domain2.biz/dir2/file2

and

301 redirect

s1.d1.info/d2/f2

to

s2.d2.biz/d2/f2

Your answer will be a permanent solution to permanent redirect problems, and permanently appreciated in advance.
--
I will try and hopefully succeed before I get an answer.
Find a house for free. Search apartments for free.
freerealestate
Registered User
Posts: 2
Joined: December 11th, 2004, 8:02 pm
Location: apartment
Contact:

Post by freerealestate »

Ok I (almost) found the answer to first one by trial and error.
You just need to drop /$1

Redirecting subdomains too, is still open.

Second problem open as well.
--
Find a house for free. Search apartments for free.
HansM
Registered User
Posts: 1
Joined: March 18th, 2005, 11:51 am

Post by HansM »

I have 4 domains for my website and a Google PageRank of about 3-5 on the different variations. Many sites are linking to me, but there are plenty variations of links - differing domains, with and without www. My question is: Is it possible to raise my PageRank by forwarding all requests to a unified url http://www.domain1.com by 301?
User avatar
ccb056
Site Administrator
Posts: 981
Joined: January 14th, 2004, 11:36 pm
Location: Texas
Contact:

Post by ccb056 »

yes
Post Reply