Hide Affiliate links from Google?

Nosence

Senior Member
Joined
Dec 28, 2010
Messages
924
Reaction score
43
I need an easy way to hide my affiliate links from google.
My site is on wordpress is there a good plugin for this?
 
Use a php redirect.

PHP:
<?php
header('Location:AFFILIATE_URL');
exit;
?>

Remember to use the nofollow attribute and block the file via robots.txt.
 
You can use an url shortener + make your link nofollow. It's the easiest thing I can think of.

D.
 
Use a php redirect.

PHP:
<?php
header('Location:AFFILIATE_URL');
exit;
?>

Remember to use the nofollow attribute and block the file via robots.txt.

I also, place the redirect in a folder (call it what ever you want) as index.php. So if I place the link in a folder named go, my link would be domain.com/go.
 
Can you have more then 1 affiliate link in the file or doyou need one for each?
 
Can you have more then 1 affiliate link in the file or doyou need one for each?

1 link per file. However, I do not see why you could not rotate offers with a link rotator (see below - found online)

<?php
$k = $_GET['sub'];
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
$aff[] = 'http://xxx.com/tracking202/redirect/dl.php?t202id=6133&t202kw=';
srand ((double) microtime() * 1000000);
$random_number = rand(0,count($aff)-1);
$lol = ($aff[$random_number]);
$lal = $lol.$k;
header("Location: $lal");
?>
 
Back
Top