homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

Correct use of redirects for tracking - spider friendly
How do I create redirect urls correctly?

 4:31 pm on Apr 7, 2004 (gmt 0)

I have a fairly large site which uses redirects on all the page links so that we can track (i.e. count) both the inbound and outbound link activity.

For example, on the HP, we have say, 10 links.
Each of those links goes to a specially coded url, the sole purpose of which is to log the hit and then send you to the desired destination page. The redirect url contains no content. All of the content is on the destination page.

For example, let's say link #1 is to the FAQ page.
Instead of just linking to /faq.html, we are linking to /redir/domain/hp/faq.html. Server code then parses the url, increments a counter, and delivers the correct page.

Google is indexing the content just fine, but is showing the redirect url in the SERPS instead of the destination page url. That is messing up our tracking.

What is the best way to handle? Can it be controlled with robots.txt?

Much obliged,




 11:12 pm on Apr 7, 2004 (gmt 0)

You can use an onClick event in the A HREF, eg.:

<A HREF="faq.html" onClick="window.location='/redir/domain/hp/faq.html'">FAQ</A>

In this way the user will be redirected when he clicks the link but the spider will follow the "real" link.


 11:33 pm on Apr 7, 2004 (gmt 0)

That's very clever! I wonder if anyone is using onclick for this purpose.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved