Forum Moderators: open

Message Too Old, No Replies

Trying to figure out whether a link is direct

Links in the form <a href="?www.domain.com/">

         

Robert Charlton

9:07 am on Mar 6, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



When requesting links, I always look at the source code of the linking page. I want to avoid redirect situations, as they've caused me grief and often don't transmit PageRank.

I just came across a page with this setup in its outbounds:
<a href="/content/link?www.domain.com/">

This almost feels like a newbie question, but I'm trying to figure out what's going on with the link?www.domain.com/ part. I'm sure it's simple. It kind of smells like a redirect to me.

dcrombie

11:30 am on Mar 6, 2004 (gmt 0)



They're using a script to redirect so that they can record the outgoing link you clicked on. A lot of sites are doing this as it's the only way to find out where your visitors go to when they exit your site.

gethan

12:13 pm on Mar 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As far as I know a 301 (moved permanently) redirect will be credited as a link by a Search Engine (at least google), whereas a 302 (moved temporarily) won't.

Does anyone know more about this?

Robert Charlton

6:11 pm on Mar 6, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



They're using a script to redirect so that they can record the outgoing link you clicked on. A lot of sites are doing this as it's the only way to find out where your visitors go to when they exit your site.

Thanks. That's what it looked like, and it's precisely what I'm trying to avoid. For the record, here's why (a partial list):

Banner ad redirect-page indexed as mirror site by Google
[webmasterworld.com...]

Is using a redirect to track outward bound links bad?
[webmasterworld.com...]

Our company Lisiting is being redirected.
[webmasterworld.com...]

Google indexing redirect pages
How can I get google to stop indexing redirects?
[webmasterworld.com...]

encyclo

6:43 pm on Mar 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The example you give definitely looks like a redirect, with the url as a variable.

<a href="/content/ <-- directory name
link <-- filename of redirect script
?www.domain.com/" <-- variable
>

For reference, if anyone needs to collect click rates but want to leave a clean link for the search engines, you should do something like:

<a href="http://www.google.com/" onclick="window.location.href='/redirect.cgi?id=12345';return false;">Google</a>

OK, it won't count the clicks of users with JS disabled, but that includes all the search bots so it's often a good thing - it gives a better impression of clickthru rates of real customers rather than the automated sort.

Robert Charlton

6:57 pm on Mar 7, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



encyclo - Thanks for the thorough answer.

...if anyone needs to collect click rates but want to leave a clean link for the search engines...

Could you elaborate on the javascript portion of the code you've posted. I assume it still requires CGI scripting of some sort on the originating site to count the links. I'm wondering whether there's an easy conversion, from the first method to the method you suggest, that I could suggest to linking partners as a way of linking to us without taking the chance of messing us up (per the threads I've posted).

encyclo

9:00 pm on Mar 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Robert, yes you still need to use a server-side script for counting the clicks. What you get with using onclick is that there is a normal href link which is subsequently overridden by the onclick event - note the "return false;" which stops the href link being activated.

From your example, you may be able to use the following (test it first, though!):

<a href="http://www.domain.com/" onclick="window.location.href='/content/link?www.domain.com/';return false;">Link text here</a>

Robert Charlton

11:56 pm on Mar 7, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



(test it first, though!)

encyclo - Thanks again. Actually, I can't test it, because I'm not the one with the outbound link counting setup... but maybe I can persuade someone with such a script installed to give it a try. I will bounce it off one of the directories that once did link to us (before I had the redirect yanked) and see if they'd like to give this setup a try. I will report back if it works.