Linking to One Page While Passing Page Rank to a Different Page

Have you ever wanted to provide a link which, when clicked, would lead somewhere other than where the link XHTML itself is coded to point? For example, you might have been trying to track clicks through a given link but without actually cluttering up the link by appending tracking parameters. Or, you might have been trying to ensure that the Page Rank contribution of a given link wasn’t lost on some obscure page deep within a site. A little simple javascript can help you send clicks to one place and Page Rank to another.

We can’t take the credit for developing this javascript technique ourselves, but we’ll take the credit (thank you very much!) for passing on to you one of the handiest javascript linking tricks we’ve seen in awhile. Using it, you can code an XHTML link to point to one URL, while passing clicks on the link through to a different URL. We’ll leave it to your imagination to figure out some of the different uses this might be put to, but two obvious ones are:

  1. Ensuring that Page Rank isn’t lost on an obscure page deeply buried somewhere in a site, and
  2. Tracking clicks through a link without cluttering it up with tracking parameters.

This simple but clever javascript linking trick is as follows:


<a href="http://www.example.com/" title="Real link points to example.com, while click on the link points to example.com/real-landing-page.html" onmouseover="if(this.href.indexOf('?')==-1) this.href+='real-landing-page.html"'; window.status='http://www.example.com/'; return true" onmouseout="window.status='Done'; return true">Link to Example.com</a>

Here, the real link is coded to point to example.com, but the javascript attached to the onmouseover event ensures that any subsequent click on the link will have a different landing page appended to the destination. Obviously, this trick won’t modify the click destination if javascript is disabled — and it won’t work if someone selects and goes to the link without a mouseover (e.g., via keyboard navigation). But for the overwhelming majority of users, this trick will ensure that the link can point one place, while the clicks go to another.

If anyone has any extra-creative uses for this little gem apart from the obvious ones described above, we’d love to hear about them!

This article was last updated on Thursday, 29th June 2006 at 9:26 pm and is filed in the General Internet Marketing, Google, Search Engine Marketing section. You can leave a response below.

Feed for this Entry Trackback Address

Bookmark and Share:

There are no comments yet on this article -- would you like to be the first to post a response?

Join the Discussion!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


A valid email address is required to enable you to personally verify and authorize your comment for posting. It will not be displayed in your post or used in any other way. SPAM comments will be deleted immediately.