Welcome to WebmasterWorld Guest from 54.162.12.134

Message Too Old, No Replies

Masking Affiliate Links

     
6:01 am on Feb 12, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



If a site has affiliate links and is suffering in the serps ***maybe*** because of this then ..

A) Should you mask them or redirect them in some way?

B) Is yes then what is the best way - staying within webmaster guidelines of course?

10:07 am on Feb 12, 2007 (gmt 0)

10+ Year Member



I used until now the following:

1. I create a file "aff_store.html"
2. add to this file meta noindex, nofollow
3. Link to www.example.com/aff_store.html
4. add to this link a nofollow
5. set up a 301 in htaccess from www.example.com/aff_store.html to the actual aff link

I do not know if this is full proof...

9:51 pm on Feb 12, 2007 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



> Should you mask them or redirect them in some way?

Sure. Just run a redirect off your own site.

Run the url through a redirector parked in your cgi-bin - and then mark cgi-bin off limits in your robots.txt.

The real benefit though, is that the redirector script can also count the urls for you as people click them. Thats mega data to have...

Here is a simple one in perl:

[perl]
#!/usr/bin/perl
# code a url with [ThisProgramURL...]

$FORM{'url'} = "http://www.yourdomain.com/";
$logs= "/mypath/mydomain/mylogdirectory/cgi-bin/";
$b= time;

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
if (length($buffer) < 5) {
$buffer = $ENV{QUERY_STRING};
}

if ($buffer =~ /(.*)\&url\=http(.*)/i) {
$buffer=$1;
$FORM{'url'}="http" . $2;
}

@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$FORM{$name} = $value;
}
if ($buffer =~ /(.*)\&url\=http(.*)/i) {
$FORM{'url'}="http" . $2;
}

($tsec,$tmin,$thour,$tmday,$tmon,$tyear,$twday,$tyday) = localtime(time);
$tmon++;
$tyear =$tyear+1900 if $tyear <1900;
$tmday = "0" . $tmday if $tmday <10;
$tmon = "0" . $tmon if $tmon <10;

#write the click to a log file:

open(LOG,">>$logs/redirect-log-$tmon-$tmday-$tyear.log");

print LOG qq"$ENV{'REMOTE_ADDR'}\$FORM{'url'}\$b\$FORM{'note'}\n";
close(LOG);

print "Location: $FORM{'url'}\n\n\n";

1;
[/perl]

9:53 pm on Feb 12, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Since making this post I have found quite a few different ways suggested - Thanks for this one it looks as good as any of them.

I guess you could also use robots.txt too keep the google away from any page that has your affiliate code / 301 redirect.

There was also a php based click tracking solution I found that actaully has a legit function other than to mask the link.

So making the change is not so difficult but how will Google and the other SE's look at it? Does anyone have an opinion even?

10:17 pm on Feb 12, 2007 (gmt 0)



Are you talking an intrinsically useful site with affiliate links, or a "thin affiliate" site?

Masking affiliate links isn't necessary with the former and isn't likely to disguise the latter.

10:21 pm on Feb 12, 2007 (gmt 0)



intrinsically useful site with affiliate links

Even so... it's still nice to mask. [ the reasons are a plenty - no need to explain ].

11:08 pm on Feb 12, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



The sites are usefull and not at all "thin" fully functional and long established 4 years and longer - Membership in excess of 70k built over time. We are just getting pushed around in the serps so masking affiliate links is one of the factors we are looking to address to help us take some ground back.
12:01 am on Feb 13, 2007 (gmt 0)

10+ Year Member



Nice script Brett, I added that to my collection.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month