Welcome to WebmasterWorld Guest from 54.160.177.33

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Correct use of redirects for tracking - spider friendly

How do I create redirect urls correctly?

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

New User

10+ Year Member

joined:Feb 2, 2003
posts:9
votes: 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,

Bob

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

Junior Member

10+ Year Member

joined:Dec 28, 2001
posts:81
votes: 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)

New User

10+ Year Member

joined:Feb 2, 2003
posts:9
votes: 0


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