views:

365

answers:

4

I'm looking for a way to implement a referral system for my web site.

Initially I went with http://mysite.com/?affid=0001 and used the affid in the query string affid value to record referrals. The problem with this is that from some common Google search phrases the link with the affid appears before the standard link in a Google search, meaning that affiliates will wrongly get credited for customers who have Googled our site.

I also heard that having multiple different links that refer to the same page (eg. http://mysite.com/?affid=0001 and http://mysite.com/?affid=0002) causes Google to reduce your ranking. Is this true?

Does anyone have a solution to these problems?

+4  A: 

What you should do is detect when there is an affiliate id in the URL, then redirect to the same URL without the affiliate ID (after storing the ID in the session, cookie, etc first of course).

This will fix both the my-affiliates-are-replacing-me-in-google problem and the duplicate content problem.

Greg
I do this at the moment using a Responce.Redirect("http://mydomain.com") [C#]. Should I be using another method to redirect?
Mr. Flibble
While I'm not sure what it would be in C#, you would want to send a 301 Permanent Redirect.
Joe Lencioni
+2  A: 

You could try the following. Whenever you receive a link containing your your affiliate code, dynamically add this meta tag to your page:

<meta name="ROBOTS" content="NOINDEX, FOLLOW"/>

Presumably this would prevent all the different affiliate versions of this page from being indexed, but you would still get the link juice for the link to your site.

Use at your own risk. Who knows what Google actually does.

Keltex
+2  A: 

As Joe mentioned in the comments, you should use a 301 (Permanent) redirect in your affiliate pages to help with your SEO. The code will look something like this:

Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.example.com");
Jonathan S.
When you do this, can you set a cookie (like the affiliate cookie)?
Keltex
A: 

yup the both ideas above mentioning redirecting affiliate links 301 {permanent} is the handiest and best way for search engines to attribute the content and links to the correct url only it only adds a split second to the user experience

thus complete code to add to start of all affilate landing pages is more like {note in any case you want the redirect bypassed if affid is not present in the url}

<?php
if (isset($_REQUEST['affid'])) {
 <make call to affiliate logging code, ensure it creates no visible output>
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.example.com/this-page/");
exit();
}
?>

rest of page content as usual

the example above is asp/vbscript

also you could do {with appropriate if statement surrounding redirect} colfusion

<CFHEADER statuscode="301" statustext="Moved Permanently">
<CFHEADER name="Location" value="http://www.example.com/this-page/"&gt;

Do not use a CFFLUSH command before the above tags, or in Application.cfm. This Coldfusion code was provided by Toll Free Forwarding.com.

HTTP 301 Redirect in Perl

#!/usr/bin/perl      -w
use strict;
print "Status: 301 Moved Permanantly\n";
print "Location: http://www.example.com/this-page/\n\n";
exit;
Alan Doherty